Image recognition method and apparatus utilizing edge detection based on magnitudes of color vectors expressing color attributes of respective pixels of color image

ABSTRACT

An image recognition apparatus operates on data of a color image to obtain an edge image expressing the shapes of objects appearing in the color image, the apparatus including a section for expressing the color attributes of each pixel of the image as a color vector, in the form of a set of coordinates of an orthogonal color space, a section for applying predetermined arrays of numeric values as edge templates to derive for each pixel a number of edge vectors each corresponding to a specific edge direction, with each edge vector obtained as the difference between weighted vector sums of respective sets of color vectors of two sets of pixels which are disposed symmetrically opposing with respect to the corresponding edge direction, and a section for obtaining the maximum modulus of these edge vectors as a value of edge strength for the pixel which is being processed. By comparing the edge strength of a pixel with those of immediately adjacent pixels and with a predetermined threshold value, a decision can be reliably made for each pixel as to whether it is actually located on an edge and, if so, the direction of that edge.

BACKGROUND OF THE INVENTION

1. Field of Application

The present invention relates to an image recognition method and animage recognition apparatus for use in an image recognition system, forextracting from a color image the shapes of objects which are to berecognized. In particular, the invention relates to an image recognitionapparatus which provides a substantial improvement in edge detectionperformance when applied to images such as aerial photographs orsatellite images which exhibit a relatively low degree of variation inintensity values.

2. Description of Prior Art

In the prior art, various types of image recognition apparatus areknown, which are intended for various different fields of application.Typically, the image recognition apparatus may be required to extractfrom an image, such as a photograph, all objects having a shape whichfalls within some predetermined category.

One approach to the problem of increasing the accuracy of imagerecognition of the contents of photographs is to set the camera whichtakes the photographs in a fixed position and to fix the lightingconditions etc., so that the photographic conditions are alwaysidentical. Another approach is to attach markers, etc., to the objectswhich are to be recognized.

However in the case of recognizing shapes within satellite images oraerial photographs, such prior art methods of improving accuracy cannotbe applied. That is to say, the photographic conditions such as thecamera position, camera orientation, weather conditions, etc., will varyeach time that a photograph is taken. Furthermore, a single image maycontain many categories of image data, such as image data correspondingto building, rivers, streets, etc., so that the image contents arecomplex. As a result, the application of image recognition to satelliteimages or aerial photographs is extremely difficult.

To extract the shapes of objects which are to be recognized, from thecontents of an image, image processing to detect edges etc., can beimplemented by using the differences between color values (typically,the intensity, i.e., gray-scale values) of the pixels which constitute aregion representing an object which is to be recognized and the colorvalues of the pixels which constitute adjacent regions to these objects.Edge detection processing consists of detecting positions at which thereare abrupt changes in the pixel values, and recognizing such positionsas corresponding to the outlines of physical objects. Various types ofedge detection processing are known. With a typical method, smoothingprocessing is applied overall to the pixel values, then each of thepixels for which the first derivative of the intensity variationgradient within the image reaches a local maximum and exceeds apredetermined threshold value are determined, with each such pixel beingassumed to be located on an edge of an object in the image.Alternatively, a “zero-crossing” method can be applied, e.g., wherebythe zero crossings of the second derivative of the gradient are bedetected to obtain the locations of the edge pixels. With a templatetechnique, predetermined shape templates are compared with the imagecontents to find the approximate positions of objects that are to berecognized, then edge detection processing may be applied to the resultsobtained.

Although prior art image recognition techniques are generally based uponintensity values of the pixels of an image, various methods are possiblefor expressing the pixel values of color image data. If the HSI (hue,saturation, intensity) color space is used, then any pixel can bespecified in terms of the magnitude of its hue, saturation or intensitycomponent. The RGB (red, green, blue) method is widely used forexpressing image data, however transform processing can be applied toconvert such data to HSI form, and edge detection processing can then beapplied by operating on the intensity values which are thereby obtained.HSI information has the advantage of being readily comprehended by ahuman operator. In particular, an image can easily be judged by a humanoperator as having a relatively high or relatively low degree ofvariation in intensity (i.e., high contrast or low contrast).

Due to the difficulties which are experienced in the practicalapplication of image recognition processing to satellite images oraerial photographs, it would be desirable to effectively utilize all ofthe color information that is available within such a photograph, thatis to say, to use not only the intensity values of the image but alsothe hue and saturation information contained in the image. However ingeneral with prior art types of edge detection processing, only parts ofthe color information, such as the intensity values alone, are utilized.

A method of edge detection processing is described in Japanese patentHEI 6-83962, which uses a zero-crossing method and, employing a HSIcolor space (referred to therein using the designations L,*C*ab,H*ab forthe intensity, saturation and hue values respectively) attempts toutilize not only the intensity values but also hue and saturationinformation. In FIG. 47, diagrams 200, 201, 202, and 203 show respectiveexamples of the results of image recognition, applied to a color pictureof an individual, which are obtained by using that method. Diagram 200shows the result of edge detection processing that is applied using onlythe intensity values of each of the pixels of the original picture,diagram 201 shows the result of edge detection processing that isapplied using only the hue values, and diagram 202 shows the resultobtained by using only the saturation values. Diagram 203 shows theresult that is obtained by combining the results shown in diagrams 200,201 and 203. As can be seen, a substantial amount of noise arises in theimage expressed by the saturation values, and this noise is insertedinto the combined image shown in diagram 203.

In some cases, image smoothing processing is applied in order to reducethe amount of noise within an image, before performing edge detectionprocessing, i.e., the image is pre-processed by using a smoothing filterto blur the image, and edge detection processing applied to theresultant image.

In order to obtain satisfactory results from edge detection processingwhich is to be applied to an image such as a satellite images or aerialphotograph, for example to accurately and reliably extract the shapes ofspecific objects such as roads, buildings etc., from the image contents,it is necessary not only to determine the degree of “strength” of eachedge, but also the direction along which an edge is oriented. In thefollowing, and in the description of embodiments of the invention and inthe appended claims, the term “edge” is used in the sense of a linesegment which is used as a straight-line approximation to a part of aboundary between two adjacent regions of a color image. The term“strength” of an edge is used herein to signify a degree of of colordifference between pixels located adjacent to one side of that edge andpixels located adjacent to the opposite side, while the term “edgedirection” is used in referring to the angle of orientation of an edgewithin the image, which is one of a predetermined limited number ofangles. If the direction of an edge could be accurately determined(i.e., based upon only a part of the pixels which constitute that edge),then this would greatly simplify the process of determining all of thepixels which are located along that edge. That is to say, if the edgedirection could be reliably determined estimated by using only a part ofthe pixels located on that edge, then it would be possible to compensatefor any discontinuities within the edge which is obtained as a result ofthe edge detection processing, so that an output image could begenerated in which all edges are accurately shown as continuous lines.

However with the method described in Japanese patent HEI 6-83962, onlythe zero-crossing method is used, so that it is not possible todetermine edge directions, since only each local maximum of variation ofa gradient of a color attribute is detected, irrespective of thedirection along which that variation is oriented. With other types ofedge detection processing such as the object template method, processingof intensity values, hue values and saturation values can be performedrespectively separately, to obtain respective edge directions. Howevereven if the results thus obtained are combined, accurate edge directionscannot be detected. Specifically, the edge directions which result fromusing intensity values, hue values and saturation values may be entirelydifferent from one another, so that accurate edge detection cannot beachieved by taking the average of these results.

Moreover, in the case of a color image such as a satellite image oraerial photograph which presents special difficulties with respect toimage recognition, it would be desirable to be able to flexibly adjustthe image recognition processing in accordance with the overall colorcharacteristics of the image that is to be processed. That is to say, itshould be possible for example for a human operator to examine such animage prior to executing image recognition processing, to estimatewhether different objects in the image mainly differ mainly with respectto differences in hue, or whether the objects are mainly distinguishedby differences in gray-scale level, i.e., intensity values. The operatorshould then be able to adjust the image recognition apparatus to operatein a manner that is best suited to these image characteristics, i.e., toextract the edges of objects based on the entire color information ofthe image, but for example placing emphasis upon the intensity values ofpixels, or upon the chrominance values of the pixels, whichever isappropriate. However such a type of image recognition apparatus has notbeen available in the prior art.

Furthermore, in order to apply image recognition processing to an imagewhose color data are expressed with respect to an RGB color space, it iscommon practice to first convert the color image data to a an HSI (hue,saturation, intensity) color space, i.e., expressing the data of eachpixel as a position within such a color space. This enables a humanoperator to more readily judge the color attributes of the overall imageprior to executing the image recognition processing, and enables suchprocessing to be applied to only the a specific color attribute of eachof the pixels, such as the intensity or the saturation attribute.However if processing is applied to RGB data which contain some degreeof scattering of the color values, and a transform from RGB to HSI colorspace is executed, then the resultant values of saturation will beunstable (i.e., will tend to vary randomly with respect to the correctvalues) within those regions of the image in which the intensity valuesare high, and also within those regions of the image in which theintensity values are low. For example, assuming that each of the red,green and blue values of each pixel is expressed by 8bits, so that therange of values is from 0 to 255, then in the case of a region of theimage in which the intensity values are low, if any of the red, green orblue values of a pixel within that region should increase by 1, thiswill result in a large change in the corresponding value of saturationthat is obtained by the transform processing operation. Instability ofthe saturation values will be expressed as noise, i.e., spurious edgeportions, in the results of edge detection processing which utilizesthese values. For that reason it has been difficult in the prior art toutilize the color saturation information contained in a color image, inimage recognition processing.

Furthermore if a substantial degree of smoothing processing is appliedto an image which is to be subjected to image recognition, in order tosuppress the occurrence of such noise, then this has the effect ofblurring the image, causing rounding of the shapes of edges and alsomerging together any edges which are located closely mutually adjacent.As a result, the accuracy of extracting edge information will bereduced. Conversely, if only a moderate degree of smoothing processingis applied to the image that is to be subjected to image recognition, orif smoothing processing is not applied to the image, then the accuracyof extraction of shapes from the image will be high, but there will be ahigh level of noise in the results so that reliable extraction of theshapes of the required objects will be difficult to achieve.

Moreover in the prior art, there has been no simple and effective methodof performing image recognition processing to extract the shapes ofobjects which are to be recognized, which will eliminate various smallobjects in the image that are not intended to be recognized (andtherefore can be considered to constitute noise) without distorting theshapes of the objects which are to be recognized.

SUMMARY OF THE INVENTION

It is an objective of the present invention to overcome thedisadvantages of the prior art set out above, by providing an imagerecognition method and image recognition apparatus whereby edgedetection for extracting the outlines of objects appearing in a colorimage can be performed by utilizing all of the color information of thepixels of the color image, to thereby achieve a substantially higherdegree of reliability of detecting those pixels which constitute edgesof objects that are to be recognized than has been possible in the priorart, and furthermore to provide an image recognition method andapparatus whereby, when such an edge pixel is detected, the direction ofthe corresponding edge can also be detected.

It is a further objective of the invention to provide an imagerecognition method and image recognition apparatus whereby processing toextract the shapes of objects which are to be recognized can beperformed such as to eliminate the respective shapes of small objectsthat are not intended to be recognized, without distorting the shapes ofthe objects which are to be recognized.

To achieve the above objectives, the invention provides an imagerecognition method and apparatus whereby, as opposed to prior artmethods which are based only upon intensity values, i.e., the gray-scalevalues of the pixels of a color image that is to be subjected to imagerecognition processing, substantially all of the color information(intensity, hue and saturation information) contained in the color imagecan be utilized for detecting the edges of objects which are to berecognized. This is basically achieved by successively selecting eachpixel to be processed, i.e., as the object pixel, and determining, foreach of a plurality of possible edge directions, a vector referred to asan edge vector whose modulus indicates an amount of color differencebetween two sets of pixels which are located on opposing sides of theobject pixel with respect to that edge direction. The moduli of theresultant set of edge vectors are then compared, and the edge vectorhaving the largest modulus is then assumed to correspond to the mostlikely edge on which the object pixel may be located. That largest valueof edge vector modulus is referred to as the “edge strength” of theobject pixel, and the direction corresponding to that edge vector isassumed to be the most likely direction of an edge on which the objectpixel may be located, i.e., a presumptive edge for that pixel.Subsequently, it is judged that the object pixel is actually located onits presumptive edge if it satisifes the conditions that:

(a) its edge strength exceeds a predetermined minimum threshold value,and

(b) its edge strength is greater than the respective edge strengthvalues of the two pixels which are located immediately adjacent to it,on opposing sides with respect to the direction of that presumptiveedge.

The above processing can be achieved in a simple manner bypredetermining only a limited number of possible edge directions whichcan be recognized, e.g., 0degrees (horizontal), 90degrees (vertical), 45degrees diagonal and −45 degrees diagonal. With the preferredembodiments of the invention, a set of arrays of numeric values referredto as edge templates are utilized, with each edge template correspondingto a specific one of the predetermined edge directions, and with thevalues thereof predetermined such that when the color vectors of anarray of pixels centered on the object pixel are subjected to arraymultiplication by an edge template, the edge vector corresponding to thedirection of that edge template will be obtained as the vector sum ofthe result. The respective moduli of the edge vectors thereby derivedfor each of the possible edge directions are then compared, to find thelargest of these moduli, as the edge strength of the object pixel.

In that way, since all of the color information contained in the imagecan be utilized to perform edge detection, the detection can be moreaccurately and reliably performed than has been possible in the priorart.

According to another aspect of the invention, data expressing the colorattributes of pixels of a color image which is to be subjected to edgedetection processing are first subjected to transform processing toexpress the color attributes of the pixels of the image as respectivesets of coordinates of an appropriate color space, in particular, acolor space in which intensity and chrominance information are expressedby separate coordinates. This enables the color attribute information tobe modified prior to performing edge detection, such as to optimize theresults that will be obtained in accordance with the characteristics ofthe particular color image that is being processed. That is to say, therelative amount of contribution of the intensity values to themagnitudes of the aforementioned color vectors can be increased, forexample. If the color attributes are first transformed into a HSI (hue,saturation, intensity) color space, then since such HSI values aregenerally expressed in polar coordinates, a simple conversion operationis applied to each set of h, s, i values of each pixel to express thecolor attributes as a color vector of an orthogonal color space in whichsaturation information and chrominance information are expressed alongrespectively different coordinate axes, i.e. to express the pixel colorattributes as a plurality of linear coordinates of that color space, andthe edge detection processing is then executed.

It is known that when image data are transformed from a form such as RGBcolor values into an HSI color space, instability (i.e., randomlarge-scale variations) may occur in the saturation values which areobtained as a result of the transform. This instability of saturationvalues is most prevalent in those regions of a color image where theintensity values are exceptionally low, and also in those regions wherethe intensity values are exceptionally high. This is a characteristicfeature of such a transform operation, and causes noise to appear in theresults of edge detection that is applied to such HSI-transformed imagedata and utilizes the saturation information, due to the detection ofspurious edge portions as a result of abrupt changes in saturationvalues between adjacent pixels. However with the present invention, suchinstability of the saturation values can be reduced, by modifying thesaturation values obtained for respective pixels in accordance with themagnitudes of the intensity values which are derived for these pixels.The noise which would otherwise be generated by such instability ofsaturation values can thereby be suppressed, enabling more reliablerecognition of objects in the color image to be achieved.

According to one aspect of the invention, when a transform intocoordinates of the HSI space has been executed, such reduction ofinstability of the saturation values is then achieved by decreasing thesaturation values in direct proportion to amounts of decrease in theintensity values. Alternatively, that effect is achieved by decreasingthe saturation values in direct proportion to decreases in the intensityvalues from a median value of intensity towards a minimum value (i.e.,black) and also decreasing the saturation values in direct proportion toincreases in the intensity values from that median value towards amaximum value (i.e., white).

According to another aspect of the invention, when a transform intocoordinates of the HSI space has been executed, such reduction ofinstability of the saturation values is then achieved by utilizing apredetermined saturation value modification function (which varies in apredetermined manner in accordance with values of intensity) to modifythe saturation values. In the case of a transform from the RGB colorspace to the HSI color space, that saturation value modificationfunction is preferably derived based on calculating, for each of thesets of r, g, b values expressing respective points in the RGB colorspace, the amount of actual change which occurs in the saturation values of the corresponding HSI set of transformed h, s, i values in responseto a small-scale change in one of that set of r, g, b values. In thatway, a saturation value modification function can be derived which isbased on the actual relationship between transformed intensity valuesand instability of the corresponding saturation values, and can thus beused such as to maintain the saturation values throughout a color imageat a substantially constant level, i.e., by varying the saturationvalues in accordance with the intensity values such as to appropriatelycompensate in those regions of the color space in which instability ofthe saturation values can occur.

Noise in the edge detection results, caused by detection of spuriousedge portions, can be thereby very effectively suppressed, enablingaccurate edge detection to be achieved.

According to another aspect, the invention provides an image recognitionmethod and apparatus for operating on a region image (i.e., an imageformed of a plurality of regions expressing the shapes of variousobjects, each region formed of a continuously extending set of pixels inwhich each pixel is identified by a label as being contained in thatregion) to process the region image such as to reduce the amount ofnoise caused by the presence of various small regions, which are notrequired to be recognized. This is achieved by detecting each smallregion having an area that is less than a predetermined threshold value,and combining each such small region with an immediately adjacentregion, with the combining process being executed in accordance withspecific rules which serve to prevent distortion of the shapes ofobjects that are to be recognized. These rules preferably stipulate thateach of the small regions is to be combined with an immediately adjacentother region which (out of all of the regions immediately adjacent tothat small region) has a maximum length of common boundary line withrespect to that small region. In that way, regions are combined withoutconsideration of the pixel values (of an original color image) withinthe regions and considering only the sizes and shapes of the regions,whereby it becomes possible to eliminate small regions which wouldconstitute “image noise”, without reducing the accuracy of extractingthe shapes of objects which are to be recognized.

The aforementioned rules for combining regions may further stipulatethat the combining processing is to be executed repetitively, to operatesuccessively on each of the regions which are below the aforementionedarea size threshold value, starting from the smallest of these regions,then the next-smallest, and so on. It has been found that this providedeven greater effectiveness in elimination of image noise, withoutreducing the accuracy of extracting the shapes of objects which are tobe recognized.

Alternatively, the region combining processing may be executed on thebasis that the aforementioned rules for combining regions furtherstipulate that, for each of the small regions which are below theaforementioned area size threshold value, the total area of the regionsimmediately adjacent to that small region is to be calculated, and theaforementioned combining processing is then to be executed starting withthe small region for which that adjacent area total is the largest, thenthe small region for which the adjacent area total is the next-largest,and so on in succession for all of these small regions.

A region image, for applying such region combining processing, can forexample be generated by first applying edge detection by an edgedetection apparatus according to the present invention to an originalcolor image, to obtain data expressing an edge image in which only theedges of objects appear, then defining each part of that edge imagewhich is enclosed within a continuously extending edge as a separateregion, and attaching a common identifier label to each of the pixelsconstituting that region.

More specifically, the present invention provides an image recognitionmethod for processing image data of a color image which is representedas respective sets of color attribute values of an array of pixels, tosuccessively operate on each of the pixels as an object pixel such as todetermine whether that pixel is located on an edge within the colorimage, and thereby derive shape data expressing an edge image whichshows only the outlines of objects appearing in the color image, withthe method comprising steps of:

if necessary, i.e., if the color attribute values of the pixels are notoriginally expressed as sets of coordinates of an orthogonal color spacesuch as an RGB (red, green, blue) color space, expressing these sets ofcolor attribute values as respective color vectors, with each colorvector defined by a plurality of scalar values which are coordinates ofan orthogonal color space;

for each of a plurality of predetermined edge directions, generating acorresponding edge template as an array of respectively predeterminednumeric values;

extracting an array of color vectors as respective color vectors of anarray of pixels having the object pixel as the center pixel of thatarray;

successively applying each of the edge templates to the array of colorvectors in a predetermined array processing operation, to derive edgevectors respectively corresponding to the edge directions;

comparing the respective moduli of the derived edge vectors to find themaximum modulus value, designating that maximum value as the edgestrength of the object pixel and designating the edge directioncorresponding to an edge vector having that maximum modulus as being apossible edge direction for the object pixel; and,

judging whether the object pixel is located on an actual edge which isoriented in the possible edge direction, based upon comparing the edgestrength of the object pixel with respective values of edge strengthderived for pixels which are positioned immediately adjacent to theobject pixel and are on mutually opposite sides of the object pixel withrespect to the aforementioned possible edge direction.

The invention further provides an image recognition method for operatingon shape data expressing an original region image, (i.e., an image inwhich pixels are assigned respective labels indicative of various imageregions in which the pixels are located) to obtain shape data expressinga region image in which specific small regions appearing in the originalregion image have been eliminated, with the method comprising repetitiveexecution of a series of steps of:

selectively determining respective regions of the original region imageas constituting a set of small regions which are each to be subjected toa region combining operation;

selecting one of the set of small regions as a next small region whichis to be subjected to the region combining operation;

for each of respective regions which are disposed immediately adjacentto the next small region, calculating a length of common boundary linewith respect to the next small region, and determining one of theimmediately adjacent regions which has a maximum value of the length ofboundary line; and

combining the next small region with the adjacent region having themaximum length of common boundary line.

Data expressing a region image, to be processed by the method set outabove, can be reliably derived by converting an edge image which hasbeen generated by the preceding method of the invention into a regionimage.

The above features of the invention will be more clearly understood byreferring to the following description of preferred embodiments of theinvention

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a general system block diagram of a first embodiment of animage recognition apparatus according to the present invention;

FIG. 2 is a conceptual diagram showing an example of actual colorattribute values of pixels in a color image, expressed in terms of anRGB color space;

FIG. 3 illustrates an RGB color space;

FIG. 4 is a diagram illustrating and edge image obtained as a result ofapplying edge detection to a simplified color image;

FIG. 5 is a basic flow diagram of the operation of the first embodiment;

FIGS. 6A to 6D are conceptual diagrams showing respective edge templatesused with the first embodiment, and corresponding edge directions;

FIG. 7 shows examples of a set of edge vectors;

FIG. 8 is a diagram illustrating how one of the edge vectors of FIG. 7defines the edge strength and possible edge direction for a pixel;

FIGS. 9A to 9D are conceptual diagrams for illustrating how the edgestrength of an object pixel is compared with the respective edgestrengths of pixels which are located adjacent thereto, on opposingsides with respect to an edge direction, for each of the possible edgedirections;

FIG. 10 is a diagram for use in describing how an edge image is obtainedas a result of applying edge detection by the apparatus of the firstembodiment to a simplified color image;

FIG. 11 is a flow diagram showing details of processing to derive edgestrength and possible edge direction information for each of the pixelsof a color image in succession, with the first embodiment of theinvention;

FIG. 12 is a flow diagram showing details of processing, executed usingthe edge strength and edge direction information derived in the flowdiagram of FIG. 11, to determine those pixels of the color image whichare located on actual edges;

FIGS. 13, 14 are flow diagrams showing alternative forms of theprocessing executed in the flow diagrams of FIGS. 12 and 13respectively;

FIG. 15 is a general system block diagram of a second embodiment of animage recognition apparatus according to the present invention;

FIG. 16 is a basic flow diagram of the operation of the secondembodiment;

FIG. 17 is a diagram illustrating an orthogonal color space utilizedwith the second embodiment, in which the respective proportions of colorvalues of a pixel are expressed as coordinate values, rather than thecolor values themselves;

FIG. 18 is a diagram for use in describing how an edge image is obtainedas a result of applying edge detection by the apparatus of the secondembodiment to a simplified color image;

FIG. 19 is a flow diagram showing details of processing to derive edgestrength and possible edge direction information for each of the pixelsof a color image in succession, with the second embodiment of theinvention;

FIG. 20 is a diagram illustrating an HSI color space utilized with athird embodiment of the invention;

FIG. 21 represents a simplified color image in which specific amounts ofvariation in color values occur within various regions of the image;

FIG. 22 is a diagram showing an edge image which is obtained as a resultof applying edge detection by the apparatus of the third embodiment tothe simplified color image of FIG. 21;

FIG. 23 is a flow diagram showing details of processing to derive edgestrength and possible edge direction information for each of the pixelsof a color image in succession, with the third embodiment of theinvention;

FIG. 24 is a diagram illustrating a modified HSI color space, ofinverted conical form, utilized with a fourth embodiment of theinvention;

FIG. 25 is a diagram showing an edge image which is obtained as a resultof applying edge detection by the apparatus of the fourth embodiment tothe simplified color image of FIG. 21;

FIG. 26 is a table of examples of sets of hue, saturation and intensityvalues which are derived by transforming the color values of respectiveregions of the color image represented in FIG. 21 into correspondingvalues of a cylindrical (i.e., conventional) HSI color space, into aninverse-conical form of modified HSI color space, into a double-conicalmodified HSI color space, and into a modified cylindrical HSI spacerespectively;

FIG. 27 is a partial flow diagram showing details of a first part ofprocessing which is executed to derive edge strength and possible edgedirection information for each of the pixels of a color image insuccession, with the fourth embodiment of the invention;

FIG. 28 is a diagram illustrating a modified HSI color space, ofdouble-conical form, utilized with a fifth embodiment of the invention;

FIG. 29 is a diagram showing an edge image which is obtained as a resultof applying edge detection by the apparatus of the fifth embodiment tothe simplified color image of FIG. 21;

FIG. 30 is a partial flow diagram showing details of a first part ofprocessing which is executed to derive edge strength and possible edgedirection information for each of the pixels of a color image insuccession, with the fifth embodiment of the invention;

FIG. 31 is a graph of a saturation value modification function which isutilized to transform color values into a modified cylindrical form ofHSI color space, with a sixth embodiment of the invention;

FIG. 32 is a diagram illustrating the modified cylindrical HSI colorspace that is utilized with the sixth embodiment;

FIG. 33 is a diagram showing an edge image which is obtained as a resultof applying edge detection by the apparatus of the sixth embodiment tothe simplified color image of FIG. 21;

FIG. 34 is a partial flow diagram showing details of a first part ofprocessing which is executed to derive edge strength and possible edgedirection information for each of the pixels of a color image insuccession, with the sixth embodiment of the invention;

FIG. 35 is a general system block diagram of a seventh embodiment of animage recognition apparatus according to the present invention;

FIG. 36 is a conceptual diagram for illustrating the principles of aregion image;

FIG. 37 is a basic flow diagram of the operation of the seventhembodiment;

FIG. 38 is a diagram for use in describing a process of eliminatingspecific small regions from a region image, performed by the seventhembodiment;

FIG. 39 is a diagram for use in describing a process of eliminatingspecific small regions from a region image, performed by an eighthembodiment of the invention;

FIG. 40 is a basic flow diagram of the operation of the eighthembodiment;

FIG. 41 is a diagram for use in describing a process of eliminatingspecific small regions from a region image, performed by a ninthembodiment of the invention;

FIG. 42 is a basic flow diagram of the operation of the ninthembodiment;

FIG. 43 is a general system block diagram of a tenth embodiment of animage recognition apparatus according to the present invention;

FIG. 44 is a basic flow diagram of the operation of the tenthembodiment;

FIG. 45 is a diagram for use in describing how specific small regionsare eliminated from a color image, by the apparatus of the tenthembodiment;

FIG. 46 is a diagram for illustrating the effect of the processing ofthe tenth embodiment in eliminating specific small regions from an edgeimage which has been derived by edge detection processing of an actualphotograph; and

FIG. 47 shows a set of edge images which have been derived by a priorart type of image recognition apparatus, with hue, saturation andintensity edge images respectively obtained.

DESCRIPTION OF PREFERRED EMBODIMENTS

Embodiments of the present invention will be described in the following,referring to the drawings. It should be noted that the invention is notlimited in its scope to these embodiments, and that various other formsof these could be envisaged.

A first embodiment of an image recognition apparatus according to thepresent invention will be described referring to FIG. 1. As used hereinin referring to embodiments of the invention, the term “imagerecognition” is used in the limited sense of signifying “processing thedata of an original color image to derive shape data, i.e., data of anedge image which expresses only the outlines of objects appearing in theoriginal color image”. The apparatus is formed of a color image datastorage section 1 which stores the data of a color image that is to besubjected to image recognition processing, an image recognitionprocessing section 2 which performs the image recognition processing ofthe color image data, and a shape data storage section 3 which storesshape data expressing an edge image, which have been derived by theimage recognition processing section 2.

The image recognition processing section 2 is made up of a color vectordata generating section 21, an edge template application section 22, anedge strength and direction determining section 23 and an edge pixeldetermining section 24. The color vector data generating section 21generates respective color vectors for each of the pixels of the colorimage, with each color vector expressed as a plurality of scalar valueswhich express the color attributes of the corresponding pixel and whichare coordinates of an orthogonal color space having more than twodimensions. The edge template application section 22 processes the pixelvector data by utilizing edge templates as described hereinafter, togenerate edge vector data. Specifically, using four different edgetemplates with this embodiment which respectively correspond to fourdifferent orientation directions within the color image, a correspondingset of four edge vectors are derived for each of the pixels of the colorimage. The edge strength and direction determining section 23 operateson each of the pixels of the color image in succession, to determinewhether the pixel may be situated on an image, and if so, determines thedirection of orientation of that possible edge and its edge strength.The edge pixel determining section 24 operates on the information thusderived by the edge strength and direction determining section 23, todetermine those pixels which are actually judged to be edge pixels, andto thereby generate the shape data, i.e., data which express an edgeimage in which only the outlines of objects in the original color imageare represented.

As shown in the left side of FIG. 2, the image data stored in the colorimage data storage section 1 are assumed to be represented by respective(x,y) coordinates of points in a 2-dimensional plane, i.e., each pair ofvalues (x,y) corresponds to one specific pixel. It is also assumed thatthe color attributes of each pixel are expressed as a position in an RGBcolor space by three scalar values which are coordinates of that space,i.e., as a set of r (red), g (green) and b (blue) values, as illustratedon the left side of FIG. 2. The function of the color vector datagenerating section 21 is to express the color attributes of each pixelof the color image as a plurality of scalar values which are coordinatesof a vector in an orthogonal color space. If such a set of scalar valuesfor each pixel is directly provided from the stored data of the colorimage data storage section 1 it will be unnecessary for the color vectordata generating section 21 to perform any actual processing. However iffor example the data of the color image were stored in the color imagedata storage section 1 in some other form, e.g., with the colorattributes of each pixel expressed as a set of polar coordinate, or withrespective index values being stored for the pixels, corresponding torespective sets of r, g, b values within a RGB table memory, then thecolor vector data generating section 21 would perform all processingnecessary to convert the data for each pixel to a plurality of scalarvalues that are coordinates of an RGB orthogonal color space.

Moreover if desired, it would be possible for the color vector datagenerating section 21 to be controlled to modify the relationshipsbetween the magnitudes of the r, g, b values of each pixel, to therebymodify the relative contributions of these to the magnitude of themodulus of a corresponding color vector.

It will be assumed that each of the r, g and b scalar values is formedof 8bits, so that each value can be in the range 0 to 255. FIG. 3illustrates the RGB color space of these coordinates.

The data of a color image such as that shown in the upper part of FIG. 4will be assumed to be stored in the color image data storage section 1,i.e., an image in which the objects are a street 40 and a building 41,in a ground area 42 . The image recognition processing section 2 appliesedge detection to this image, to thereby obtain an edge image as shownin the lower part of FIG. 4, which is stored in the shape data storagesection 3. The edge image is a bi-level image, i.e., the black lines inthe lower part of FIG. 4 correspond to pixels which are situated alongthe edges of objects which appear in the original color image, while thewhite portions correspond to pixels which do not correspond to edges.Basically, the edge detection that is executed by the image recognitionprocessing section 2 serves to detect the change between the color ofthe road 40 and the color of adjacent areas, and between the color ofthe building 41 and the color of adjacent areas, and to judge that eachposition where the amount of such change is large corresponds to theposition of an edge. The shapes of the street and building are therebydetected as the shapes 50, 51 respectively, shown in the lower part ofFIG. 4.

FIG. 5 is a flow diagram showing the basic features of the operation ofthe first embodiment, which is executed as follows. Step 10: Respectivecolor vectors are derived for each of the pixels of the color image,with each color vector expressed as a combination of scalar values,which in this instance are constituted by the aforementioned r, g and bvalues of the pixel. The color vector of a pixel at position (x, y) ofthe color image, having the RGB scalar values r(x, y), g(x, y), b(x, y),is expressed by equation (1) below $\begin{matrix}{{{PV}\quad \left( {x,y} \right)} = \begin{pmatrix}{r\quad \left( {x,y} \right)} \\{g\quad \left( {x,y} \right)} \\{b\quad \left( {x,y} \right)}\end{pmatrix}} & (1)\end{matrix}$

Step 11: local multiplication and summing operations are performed usingthe four edge templates h1, h2, h3, h4, to thereby generate edgetemplate data EV1, EV2, EV3, EV4 for each of the pixels of the colorimage. FIGS. 6A, 6B, 6C, 6D respectively show the four edge templatesdesignated as h1, h2, h3, h4 which are utilized with this embodiment. InFIG. 6A, h1 is an edge template corresponding to an edge that isoriented in the left-right direction of the color image, and returns alarge value when this template is applied to an image position wherethere is an edge that extends along the right-left direction. Similarlyin FIG. 6B, h2 is an edge template for the lower left-upper rightdiagonal direction, in FIG. 6C h3 is an edge template for the top-bottomdirection, and in FIG. 6D h4 is an edge template for the lowerright-upper left diagonal direction. As shown, each edge templatebasically consists of an array of numeric values which are divided intotwo non-zero sets of values, of mutually opposite sign, which arelocated symmetrically with respect to a line of zero values that isoriented in the edge direction corresponding to that edge template.

The values 0, 1, 2, −2 and −1 of the edge template h1 can be expressedas shown in equations (2) below.

h 1 (1,−1)=1, h 1 (0,−1)=2, h 1 (1,−1)=1

h 1 (−1, 0)=0, h 1 (−0, 0)=0, h 1 (1, 0)=0

h 1 (−1,−1)=−1, h 1 (0, 1)=−2, h 1 (1, 1)=−1  (2)

The multiplication and summing processing that is applied between thefour both-direction edge templates and PV(x, y) is expressed byequations (3) below. $\begin{matrix}{{{{EV1}\quad \left( {x,y} \right)} = {\sum\limits_{k = {- 1}}^{1}\quad {\sum\limits_{l = 1}^{1}\quad {{h1}\quad \left( {k,1} \right)\quad {PV}\quad \left( {{x + k},{y + 1}} \right)}}}}{{{EV2}\quad \left( {x,y} \right)} = {\sum\limits_{k = {- 1}}^{1}\quad {\sum\limits_{l = 1}^{1}\quad {{h2}\quad \left( {k,1} \right)\quad {PV}\quad \left( {{x + k},{y + 1}} \right)}}}}{{{EV3}\left( {x,y} \right)} = {\sum\limits_{k = {- 1}}^{1}\quad {\sum\limits_{l = 1}^{1}\quad {{h3}\quad \left( {k,1} \right)\quad {PV}\quad \left( {{x + k},{y + 1}} \right)}}}}{{{EV4}\quad \left( {x,y} \right)} = {\sum\limits_{k = {- 1}}^{1}\quad {\sum\limits_{l = 1}^{1}\quad {{h4}\quad \left( {k,1} \right)\quad {PV}\quad \left( {{x + k},{y + 1}} \right)}}}}} & (3)\end{matrix}$

The above signifies that, designating the image position of the pixelthat is currently being processed (i.e., the object pixel) as (x, y), afirst edge vector EV1(x, y) is obtained by multiplying the color vectorP(x−l, y−1) of the pixel which is located at the image position (x−1,y−1) by the scalar value that is specified for the (−1, −1) position inthe edge template h1, i.e. by the value 1, multiplying the color vectorP(x, y−1) of the pixel which is located at the image position (x, y−1)by the scalar value that is specified for the (0, −1) position in theedge template h1, i.e. by the value 2, and so on. In that way, the edgetemplate hi is applied to the color vector of the object pixel and tothe respective color vectors of eight pixels which are locatedimmediately adjacent to the object pixel in the color image. A set ofnine vectors is thereby obtained, and the vector sum of these is thencalculated, to obtain a first edge vector EV1(x,y).

The above array multiplication and vector summing process is appliedusing the other three edge templates h2, h3, h4 in the same manner, tothe object pixel and its adjacent pixels, to obtain the edge vectorsEV2(x,y), EV3(x,y) and EV4(x,y) respectively corresponding to theseother three edge templates. The above process is executed for each ofthe pixels of the color image in succession, as the object pixel.

FIG. 7 shows the four edge vectors that are obtained as a result ofapplying the four edge templates of FIG. 6 to the color vector (r, g, bvalues 72, 183, 207 respectively) of the center pixel in the diagram atthe right side of FIG. 2. EV1 is the edge vector corresponding to theleft-right direction, EV2 corresponds to the lower left-upper rightdiagonal direction, EV3 corresponds to the bottom-top direction, and EV4corresponds to the lower right-upper left diagonal direction.

Step 12: Using these edge vectors EV1, EV2, EV3, EV4, the strength andorientation of an edge on which the object pixel may be located aredetermined. That edge will be referred to in the following as the“presumptive edge” obtained for the object pixel, which may or may notbe subsequently confirmed to be an actual edge as described hereinafter.The strength of the presumptive edge obtained for the object pixelhaving the image position (x, y), which is obtained as the value of thelargest of the four moduli of the edge vectors EV1, EV2, EV3, EV4, willbe designated as “MOD(x,y)”, and the direction of that presumptive edgewill be designated as “DIR(x,y)”. That is to say, applying processing inaccordance with equation (4) below, respective values of strength of thepresumptive edge, MOD(x,y) is obtained for each of the pixels of thecolor image in succession, and the strength values are storedtemporarily.

mod(x, y)=max(|EV1(x, y)|, |EV2(x, Y)|, |EV3(x, y)|, |EV4(x, y|)  (4)

If it is found when attempting to apply equation (4) that none of themoduli of the edge vectors obtained for a pixel exceeds all of the otheredge vector moduli obtained for that pixel, then this may result fromall of the moduli of the edge vectors EV1(x,y), EV2(x,y), EV2(x,y),EV3(x,y) corresponding to the respective edge templates h1 to h4 beingof equal magnitude. In that case no possible edge direction is obtainedfor the object pixel, however the modulus value of the edge vectors isstored, as the edge strength value MOD obtained for that pixel, for usein subsequent processing.

Next, successively selecting each of the pixels (i.e., those pixels forwhich a presumptive edge has been obtained) as the object pixel andapplying processing in accordance with equation (5) below, theorientation of the presumptive edge, designated in the following asDIR(x,y), is obtained for each of the pixels. That orientation is thedirection corresponding to the edge template whose application resultedin generation of the edge strength value MOD(x,y) for that pixel.Information specifying the obtained edge directions for the respectivepixels is temporarily stored.

“Left-right” if mod(x, . . . y)=|EV 1(x,y)|“Lower left-top right” if mod(x,y,)=|EV 2(x,y)|dir(x, y)=“Bottom-top” if mod (x,y)=|EV 3(x, y)|“Lowerright-top left” if mod (x,y)=|EV 4(x,y)|  (5)

For example, comparing the magnitudes of the respective moduli of theedge vectors shown in FIG. 7, the magnitude for EV3 is 437, which islarger than the magnitudes of each of the other edge vector moduli, sothat as shown in FIG. 8, the strength MOD of the presumptive edge ofthat pixel is obtained as 437. Also, since that edge strength valuecorresponds to the edge template h3 shown in FIG. 6, the edge directionof that presumptive edge is determined as being the bottom—top directionof the color image.

Step 13: the edge image data “EDGE” are generated, using a predeterminededge strength threshold value t, the respective presumptive edgestrength values “MOD” obtained for the pixels of the color image and therespective edge directions “DIR” obtained for the pixels, in the mannerindicated by equation (6) below

edge(x,y)=“ledge” if:

(mod(x,y)≧t&((dir(x,y)=“left-right” direction&mod(x,y)>mod(x,y−1)&mod(x,y)>mod(x,y+1)),

or if (mod(x,y)≧t&((dir(x,y)=“lower left-top right” direction&mod(x,y)>mod(x−1,y−1)&mod(x,y)>mod(x+1,y+1)),

or if (mod(x,y)≧t&((dir(x,y)=“bottom-top” direction &mod(x,y)>mod(x−1,y)&mod(x,y)>mod(x+1,y)),

or if (mod(x,y)≧t&((dir(x,y)=“left-right” direction&mod(x,y)>mod(x,y−1)&mod(x,y)>mod(x,y+1)).

 Otherwise, edge(x,y)≠“edge”  (6)

That is to say, the pixels for which respective presumptive edges (i.e.,possible edge directions) have been derived are successively selected asthe object pixel, with the threshold value t, edge strength MOD(x,y) andedge direction DIR(x,y) of the object pixel being used to make adecision as to whether or not the object pixel actually is an edgepixel. With equation (6), if a pixel has an edge strength that is higherthan t, and the relationship between that pixel and the adjacent pixelssatisfies one of the four patterns which are shown in FIGS. 9A to 9C,then it is judged that this is an edge pixel.

More specifically, numeral 200 in FIG. 9A designates an array of sixpixels of the color image, centered on a pixel 202 which is currentlybeing processed as the object pixel. The designations “weak”, “strong”indicate the relationships between the respective values of strengththat have been previously obtained for the pixels as described above. InFIG. 9A, it is assumed that the edge strength MOD obtained for pixel 202is the edge vector modulus that is obtained by using the edge templateh1 shown in FIG. 6, i.e., EV1(x,y) in equation (3) described above, andhence the orientation DIR of the presumptive edge corresponding to pixel202 is the left-right direction of the color image, i.e. a presumptiveedge has been derived for pixel 202 as a straight line of undefinedlength which passes through that pixel and is oriented in the horizontaldirection of FIG. 9A. It is further assumed in FIG. 9A that therespective values of edge strength derived for the two pixels 201, 203which are immediately adjacent to the object pixel 202 and disposed onopposing sides of the presumptive edge derived for the object pixel 202are both less than the value of strength that has been derived for thepresumptive edge of the object pixel 202. In that condition, if thatedge strength value obtained for the object pixel 202 exceeds the edgethreshold value t, then it is judged that pixel 202 is located on anactual edge within the color image.

Similarly in FIG. 9B, the presumptive edge that has been derived for theobject pixel 205 is a line extending through the pixel 205, oriented inthe lower left-upper right diagonal direction of the color image, andthe respective values of strength derived for the two pixels 204, 206which are immediately adjacent to the object pixel 205 and disposed onopposing sides of the presumptive edge derived for the object pixel 205are both less than the value of strength that has been derived for thepresumptive edge of the object pixel 205. Thus in the same way as forthe example of FIG. 9A, assuming that the edge strength value obtainedfor the object pixel 205 exceeds the edge threshold value t, it will bejudged that pixel 205 is located on an actual edge, oriented diagonallyas shown in FIG. 9B within the color image. In a similar way, it will bejudged that the object pixel is located on an actual vertically orientededge if the pattern condition of FIG. 9C is satisfied, or on an actualedge which is oriented along the lower right-upper left diagonaldirection, if the pattern condition of FIG. 9D is satisfied.

As can be understood from the above description, the effect of applyingone of the edge templates shown in FIGS. 6A to 6D to an array of colorvectors centered on an object pixel is to obtain (as an edge vector) thevector difference between the weighted vector sum of the color vectorsof a first set of pixels which are located on one side of the objectpixel with respect to the edge direction of that template (i.e., whosevectors are multiplied by 1, 2,and 1 respectively) and the weightedvector sum of the color vectors of a second set of pixels which arelocated on the opposite side of the object pixel (i.e., whose vectorsare multiplied by −1, −2 and −1, respectively). It will be furtherunderstood that the invention is not limited to the configurations ofedge templates utilized with this embodiment.

FIG. 11 is a flow diagram showing details of the processing performed insteps 10 to 12 of FIG. 5, to derive the edge vectors and the edgestrength “mod” and edge direction “dir” information for the pixels ofthe color image that is to be processed. The sequence of steps 1001 to1010 of FIG. 11 are repetitively executed for each of the pixels of thecolor image in succession, i.e., with the pixels being successivelyselected as the object pixel for which mod and dir information are to bederived. In step 1002, a plurality of scalar values expressing a colorvector in that orthogonal RGB color space for the object pixel are readout from the color image data storage section 1 (i.e., the r, g and bvalues for the object pixel) as are also the respective sets of RGBvalues expressing the color vectors of the group of eight pixels whichare immediately adjacent to the object pixel and surround the objectpixel. In step 1003 that array of nine color vectors is successivelymultiplied by each of the arrays of values which constitute the edgetemplates h1, h2, h3 and h4, in the manner described hereinabove, withthe respective vector sums of the results being obtained as the edgevectors EV1, EV2, EV3 and EV4. In step 1004, the moduli of these edgevectors are obtained and are compared, to find if one of these isgreater than each of the other three. If this condition is met, asdetermined in step 1006, then that largest value of modulus istemporarily stored in an internal memory (not shown in the drawings) asthe edge strength MOD(x,y) of the object pixel, together withinformation indicating the direction corresponding to that largest edgevector as the orientation DIR(x,y) of the object pixel.

However if the condition whereby one of moduli of EV1, EV2, EV3 and EV4is greater than each of the other three is not satisfied then step 1005is executed to judge whether all of the vector moduli have the samevalue. If that condition is found, then no direction can be obtained asDIR(x,y) for the object pixel, and only that modulus value is stored asthe edge strength MOD(x,y) for the object pixel, in step 1007. If thatcondition is not found (i.e., two or three of the vector moduli have thesame value, which is greater than that of the remaining one(s)) then themodulus of an arbitrarily selected one of the edge vectors which havethe largest value is selected as the edge strength MOD(x,y) of theobject pixel, while the orientation of the edge template correspondingto that selected edge vector is stored as the edge direction DIR(x,y) ofthe object pixel, in step 1008.

FIG. 12 is a flow diagram showing details of the processing performed instep 13 of FIG. 5, to derive the shape data which are to be output andstored in the image recognition processing section 2, i.e., to find eachof the pixels which is actually located on an edge within the colorimage, and the corresponding edge direction. The sequence of steps 1011to 1017 of FIG. 12 is successively applied to each of the pixels of thecolor image for which edge direction information DIR has been derivedand temporarily stored, together with corresponding edge strengthinformation MOD, as described above. In steps 1011, 1012 the next pixelto which this processing is to be applied as the object pixel isselected, and the edge strength MOD(x,y) and edge direction DIR(x,y)information for that object pixel are read out. If it is judged in step1013 that the value of MOD(x,y) is greater than or equal to the edgethreshold value t, then step 1004 is executed, to read out therespective values of edge strength of the two pixels which are locatedimmediately adjacent to the object pixel and on mutually opposite sidesof the presumptive edge that has been detected for the object pixel.

Next, in step 1015, the three values of edge strength are compared, todetermine if the edge strength MOD(x,y) of the object pixel is greaterthan the edge strengths of both these adjacent pixels. If so, then thepixel which corresponds in position to the object pixel within the imageexpressed by the shape data (i.e., the edge image) is specified as beinglocated on an actual edge, which is oriented in the direction DIR(x,y).In that way, the shape data expressing the edge image are successivelyderived as binary values which indicate, for each pixel of the colorimage, whether or not that pixel is located on an edge.

It can thus be understood that with the above processing, a pixel of thecolor image, when processed as the object pixel, will be judged to belocated on an actual edge within the color image if it satisfies theconditions:

(a) an edge direction DIR, and also a value of edge strength MOD thatexceeds the edge threshold value t, have been obtained for that objectpixel, and

(b) the edge strength MOD of that object pixel is greater than each ofthe respective edge strengths of the two pixels which are locatedimmediately adjacent to the object pixel and are on mutually oppositesides of a presumptive edge (i.e., a line which is oriented in directionDIR, passing through that pixel) that has been obtained for the objectpixel.

With the operation of FIG. 11, FIG. 12 described above, in the eventthat it is found in step 1005 that there are a plurality of edge vectorshaving the same magnitude of modulus, which is greater than that of theremaining vector(s), for example if the moduli of EV1, EV2 are identicaland each are larger than the respective moduli of EV3, EV4, then theedge direction corresponding to an arbitrarily selected one of thelargest edge vectors is selected to be used as the edge direction DIR ofthe object pixel, in step 1008. However various other procedures couldbe used when such a condition occurs. An alternative procedure isillustrated in the flow diagrams of FIGS. 13, 14. In step 1008 b of FIG.13, the respective edge template directions corresponding to each of theedge vectors having the largest moduli are all stored as candidates forthe edge direction DIR of the object pixel, together with the maximumedge vector modulus value as the edge strength MOD. In that case, asshown in FIG. 14, if the pixel which has been selected as the objectpixel in step 1011 is found to have a plurality of correspondingcandidate edge directions DIR stored, then the information specifyingthese different directions are successively read out in repetitions of astep 1012 b. That is to say, the processing of steps 1012b to 1015 isrepetitively executed for each of these directions until either it isfound that the condition of step 1015 is satisfied (the pixel is judgedto be on an actual edge) or all of the candidate edge directions forthat pixel have been tried, as judged in step 1018. In other respects,the processing shown is identical to that of FIGS. 11, 12 describedabove.

A specific example will be described in the following. The upper part ofFIG. 10 shows data of a color image, expressed as coordinates of an RGBcolor space, representing a simplified aerial photograph which is to besubjected to image recognition. The image is identical to that of FIG.4, containing a street, ground, and a building, with the building roofand first and second side faces of the building appearing in the image.Respective RGB values for each of these are assumed to be as indicatedin the drawing.

For example it is assumed that each of the pixels representing theground surface have the r, g and b values 195, 95 and 0 respectively. Byapplying the first embodiment of the invention to this image to processthe data of the color image in the manner described above, bi-levelshape data are obtained from the image recognition processing section 2and stored in the shape data storage section 3, with the shape dataexpressing the outlines of the street and the building roof and sidefaces in the form of edges, as shown in the lower part of FIG. 10, i.e.,with the shape of the street formed as two edges 50, and the shape ofthe building roof and side faces being formed as the set of edges 51.

As described above, with the present invention, pixel vector data aregenerated as combinations of pluralities of scalar values constitutingpixel values, and edge detection is performed by operating on thesepluralities of scalar values. With prior art types of edge detectionwhich operate only upon values of intensity, even if the outlines of abody exist within an image but the outlines are not in the form ofvariations in intensity, then edge detection cannot be achieved for thatbody. However with the present invention, in such a condition, edgedetection becomes possible.

Furthermore, by applying edge templates to pixel vector data, edgedirections can be obtained easily and reliably. If the direction of anedge is known, then it becomes possible to form that edge as acontinuous line (as expressed in the shape image that is generated) evenif all of the pixels corresponding to that edge are not detected. Thatis to say, if the direction of an edge can be reliably obtained on thebasis of a part of the pixels of that edge, then interpolation of theremaining pixels can readily be performed, to thereby eliminate anybreaks in the continuity of the edge. For that reason, the basic featureof the present invention whereby it is possible not only to detect thestrengths of edges, but also to reliably estimate their directions, ishighly important.

A second embodiment of an image recognition apparatus according to thepresent invention is shown in the general system block diagram of FIG.15. Here, sections having similar functions to those of the apparatus ofthe first embodiment shown in FIG. 1 are designated by identicalreference numerals to those of FIG. 1. In the apparatus of FIG. 15, thecolor vector data generating section 121 performs a similar function tothat of the color vector data generating section 21 of the firstembodiment, but in addition receives control parameter adjustment data,supplied from an external source as described hereinafter. In addition,the apparatus of FIG. 15 further includes a color space coordinatesconversion section 25 is for performing color space coordinate transformprocessing. The data stored in the image data storage section 1, whichin the same way as described for the first embodiment will be assumed todirectly represent a color image as sets of r, g, b values that arecoordinates of an RGB color space, are transformed to cords of adifferent orthogonal color space, specifically, a color space in whichchrominance and intensity values are mutually separated. Color vectorsare then generated for each of the pixels data by the color vector datagenerating section 121 using the results of the transform operation.

FIG. 16 is a flow diagram showing the basic features of the operation ofthe second embodiment.

Steps 11, 12 and 13 of this flow diagram are identical to those of thebasic flow diagram of the first embodiment shown in FIG. 5. Step 10 ofthis flow diagram differs from that of the first embodiment in thatcolor vector modulus adjustment can be performed, as describedhereinafter. A new step 20 is executed as follows.

Step 20: the color attribute data of each pixel are transformed from theRGB color space to coordinates of the color space shown in FIG. 17.Specifically, each set of pixel values r(x, y), g(x, y), b(x, y) isoperated on, using equation (7), to obtain a corresponding set ofcoordinates c1(x, y), c2(x, y), c3(x, y). Here, c1 expresses a form ofintensity value for the pixel, i.e., as the average of the r, g and bvalues of the pixel, c2 expresses the proportion of the red component ofthat pixel in relation to the total of the red, green and blue valuesfor that pel, and C3 similarly expresses the proportion of greencomponent of that pixel in relation to the total of the red, green andblue values of that pixel. $\begin{matrix}{{{{c1}\quad \left( {x,y} \right)} = \frac{{r\quad \left( {x,y} \right)} + {g\quad \left( {x,y} \right)} + {b\quad \left( {x,y} \right)}}{3}}{{{c2}\quad \left( {x,y} \right)} = {\frac{r\quad \left( {x,y} \right)}{{r\quad \left( {x,y} \right)} + {g\quad \left( {x,y} \right)} + {b\quad \left( {x,y} \right)}} \cdot {max\_ value}}}{{{c3}\left( {x,y} \right)} = {\frac{g\quad \left( {x,y} \right)}{{r\quad \left( {x,y} \right)} + {g\quad \left( {x,y} \right)} + {b\quad \left( {x,y} \right)}} \cdot {max\_ value}}}} & (7)\end{matrix}$

As can be understood from the above equation and FIG. 17, the colorattributes of a pixel having the maximum r value (i.e., 255) and zero gand b values, in the RGB color space, are expressed as a position withinthe color space of FIG. 17 which has the c1, c2 c3 coordinates (255/3,255, 0). This is the point designated as “red” in FIG. 17. Similarly,points which correspond to the “maximum blue component, zero red andgreen components” and “maximum green component, zero red and bluecomponents” conditions within the RGB color space are respectivelyindicated as the “blue” and “green” points in FIG. 17.

Step 10: the pixel vector data PV are generated from the pixel values.Pixel vector data are generated for each pixel based on a combination ofthe attribute values of the pixel. A vector data set PV(x, y) isgenerated for each of the pixels, by applying equation (8) below to thepixel values c1(x, y), c2(x, y), c3(x, y). By adjusting the parametersa1, a2 and a3 of equation (8), through input of control parameteradjustment data to the color vector data generating section 121, it ispossible to determine whether the edge detection will be based mainly onthe c1 values, the c2 values, or on the c3 values, i.e., the relativecontributions made by the c1, c2 and c3 coordinates of a color vector tothe magnitude of the modulus of the color vector can be adjusted byaltering the values of the control parameters a1, a2 and a3. Theresultant color vector is expressed as follows. $\begin{matrix}{{{PV}\quad \left( {x,y} \right)} = \begin{pmatrix}{{{a1} \cdot {c1}}\quad \left( {x,y} \right)} \\{{{a2} \cdot {c2}}\quad \left( {x,y} \right)} \\{{{a3} \cdot {c3}}\quad \left( {x,y} \right)}\end{pmatrix}} & (8)\end{matrix}$

FIG. 19 is a flow diagram showing the processing executed with thisembodiment to derive the candidate edge strength values (MOD) and edgedirections (DIR) for the pixels of the color image. As shown, thisdiffers from the corresponding diagram of FIG. 11 of the firstembodiment only with respect to the steps 1002 a, 1002 b which replacestep 1002 of FIG. 11, for deriving the color vectors as sets ofcoordinates expressing respective positions within the color space ofFIG. 17.

A specific example will be described in the following. The upper part ofFIG. 18 shows data of a color image representing a simplified aerialphotograph which is to be subjected to image recognition. Examples ofthe r, g and b values for various regions of the color image, and thecorresponding sets of c1, c2, c3 values which express the colorattributes of these regions as positions in the color space of FIG. 17are also indicated in the drawing. As described above the respectivesets of r, g and b values of the pixels, for the RGB color space, areconverted to corresponding sets of c1, c2 c3 coordinates, the values ofthe control parameters a1, a2, a3 are set in accordance with thecharacteristics of the color image (for example if required, such thatdifferences in respective intensity values between adjacent regions willhave a relatively large effect upon the differences between magnitudesof corresponding color vectors as described hereinabove), and respectivecolor vectors for the pixels of the color image, expressed in the colorspace of FIG. 17, are thereby obtained. Edge detection is thenperformed, to obtain the shape of the street and the building asdesignated by numerals 50 and 51 respectively in the lower part of FIG.18.

As described above, with this embodiment, respective color vectors forthe pixels of the color image are derived by transform processing of thestored image data into coordinates of a color space which is moreappropriate for edge detection processing than the original RGB colorspace. That is to say, the image data are subject to conversion to colorspace coordinates whereby the edge detection processing can be adjusted(i.e., by altering the relative values of the control parameters) suchas to match the edge detection processing to the particularcharacteristics of the image that is to be subjected to imagerecognition processing. For example, if differences between variousregions of the image are primarily gray-scale variations, i.e.,variations in intensity rather than in chrominance, then this fact canreadily be judged beforehand by a human operator, and the controlparameter values adjusted such as to emphasize the effects of variationsin intensity values upon the edge detection process.

A third embodiment of an image recognition apparatus according to thepresent invention will be described. The apparatus configuration isidentical to that of the second embodiment (shown in FIG. 15).

The basic operation sequence of this embodiment is similar to that ofthe second embodiment, shown in FIG. 16. However with the thirdembodiment, the transform is performed from an RGB color space to an HSIcolor space, instead of the color space of FIG. 17. That is to say,steps 11, 12 and 13 are identical to those of the first embodiment,however step 20 is performed as follows. Step 20: each pixel value istransformed from the RGB color space to the coordinates of thecylindrical color space shown in FIG. 20. Each set of pixel values r(x,y), g(x, y), b(x, y) is operated on, using equation (9), to obtain acorresponding set of hue, saturation and intensity values as h(x, y),s(x, y) and i(x, y) respectively of the HSI color space of FIG. 20. Inthis case, the gray-scale values, i.e. values of intensity extendingfrom black (as value 0) to white (as maximum value), are plotted alongthe vertical axis of the cylindrical coordinate system shown in the leftside of FIG. 20.

imax=max (r, g, b)

imin=min(r,g,b) $\begin{matrix}{{i = \frac{{imax} + {imin}}{2}}{s = \left\{ {{\begin{matrix}0 & {{{if}\quad {imax}} = {imin}} \\{\frac{{imax} - {imin}}{{imax} + {imin}}\quad {max\_ value}} & {{{if}\quad i} \leq \frac{max\_ value}{2}} \\{\frac{{imax} - {imin}}{{max\_ value} - {imax} - {imin}} \cdot {max\_ value}} & {{{if}\quad i} > \frac{max\_ value}{2}}\end{matrix}{r1}} = {{\frac{{imax} - r}{{imax} - {imin}}{g1}} = {{\frac{{imax} - g}{{imax} - {imin}}{b1}} = {{\frac{{imax} - b}{{imax} - {imin}}{r1}} = {{\frac{{imax} - r}{{imax} - {imin}}{g1}} = {{\frac{{imax} - g}{{imax} - {imin}}{b1}} = {{\frac{{imax} - b}{{imax} - {imin}}h} = \left\{ \begin{matrix}{undefined} & {{{if}\quad {imax}} = {imin}} \\\frac{\left( {{b1} - {g1}} \right)\quad \pi}{3} & {{{if}\quad r} = {imax}} \\\frac{\left( {2 + {r1} - {b1}} \right)\quad \pi}{3} & {{{if}\quad g} = {imax}} \\\frac{\left( {4 + {g1} - {r1}} \right)\quad \pi}{3} & {{{if}\quad b} = {imax}}\end{matrix} \right.}}}}}}} \right.}} & (9)\end{matrix}$

The saturation value expresses the depth of a color, and corresponds toa distance extending radially from the center of the coordinate systemshown in the right side of FIG. 20. The hue value corresponds to anangle in the coordinate system shown on the right side of FIG. 20. Forexample when this angle is zero degrees, this corresponds to the colorred, while an angle of 2/3π radians corresponds to blue.

It should be noted that there are various models for performing thetransform from an RGB to an HSI color space, and that the presentinvention is not limited to use of equation (9) for that purpose. Withequation (9) the range of values of each of r, g, b, i, and s is from 0to the maximum value (i.e., 255 in the case of 8-bit data values),designated as “max_value”. The range of values of h is from 0 to 2πradians. For simplicity, the image position coordinates (x, y) have beenomitted from the equation.

With this embodiment, step 10 of the flow diagram of FIG. 16 is executedas follows. Using equation (10) below, color vectors PV(x, y) aregenerated for each of the pixels, from the hue, saturation and intensityvalues h(x, y), s(x, y), i(x, y) of each pixel. $\begin{matrix}{{{PV}\quad \left( {x,y} \right)} = \begin{pmatrix}{{a \cdot s}\quad {\left( {x,y} \right) \cdot \cos}\quad \left( {h\quad \left( {x,y} \right)} \right)} \\{{a \cdot s}\quad {\left( {x,y} \right) \cdot \sin}\quad \left( {h\quad \left( {x,y} \right)} \right)} \\{i\quad \left( {x,y} \right)}\end{pmatrix}} & (10)\end{matrix}$

Here each color vector PV is generated by converting the portions h(x,y), s(x, y) that are expressed in polar coordinates to a linearcoordinate system. By adjusting the value of the control parameter “a”,it becomes possible for example to place emphasis on the intensityvalues, in the edge detection processing. For example if the value ofthe parameter “a” is made equal to 1, then edge detection processingwill be performed placing equal emphasis on all of the values in the HSIspace, while if the value of the parameter a is made less than 1, thenedge detection processing will be performed placing greater emphasis onintensity values.

That is to say, the relative contribution of the intensity component ofthe color attributes of a pixel to the magnitude of the modulus of thecolor vector of that pixel will increase in accordance with decreases inthe value of the control parameter “a”.

The operation of this embodiment for generating respective color vectorscorresponding to the pixels of the color image is shown in more detailin the flow diagram of FIG. 23. This differs from the corresponding flowdiagram of FIG. 11 for the first embodiment in that the step 1002 of thefirst embodiment, for deriving the array of color vectors PV which areto be operated on using the edge templates in equation (2) as describedabove to obtain the edge vectors EV1(x,y) to EV2(x,), is replaced by aseries of three steps, 1002 a, 1002 c and 1002 d.

In the first of these, step 1002 a, the respective sets of r, g, bvalues for the object pixel and its eight adjacent surrounding pixelsare obtained from the image data storage section 1, and in step 1002 ceach of these sets of r, g, b values of the RGB color space is convertedto a corresponding set of h, s, i values of the cylindrical HSI colorspace shown in FIG. 20. In step 1002 d, each of these sets is convertedto a corresponding set of three linear coordinates, i.e., of anorthogonal color space, using the trigonometric operation describedabove, to thereby express the hue and saturation information of eachpixel in terms of linear coordinates instead of polar coordinates, whileeach of the resultant s.cos h and s.sin h values is multiplied by thecontrol parameter “a”, as indicated by equation (10).

A specific example will be described in the following. FIG. 21 showsdata of a color image representing a simplified aerial photograph whichis to be subjected to image recognition. As opposed to the image of theupper part of FIG. 10, it is assumed with the image of FIG. 21 thatthere are ranges of variation of pixel values, as would occur in thecase of an actual aerial photograph. Thus in each of the regions of thecolor image, rather than all of the RGB values of that region beingidentical, there is a certain degree of scattering of these pixelvalues.

As described above, the color attributes of the pixels of the colorimage are converted from RGB to HSI color space coordinates, which arethen converted to respective coordinates of an orthogonal system byapplying equation (10) above, to thereby obtain respective color vectorscorresponding to the pixels, and edge detection processing then appliedto the color vectors in the same manner as described for the firstembodiment. The result of applying this processing to the image shown inFIG. 21 is illustrated in FIG. 22.

As shown, the shapes of the street and the building have been extractedfrom the original image, as indicated by numerals 52 and 53respectively. Due to the scattering of pixel values in the originalcolor image, some level of noise will arise in the edge detectionprocess, so that as shown in FIG. 21, some discontinuities occur in theoutlines of the street and the building.

Thus with this embodiment of the present invention, pixel vector dataare generated after having converted pixel values which have been storedas coordinates of a certain color space into the coordinates of an HSIcolor space, which are then converted to linear coordinates of a colorspace in which the luminance and chrominance information correspond torespectively different coordinates. This simplifies edge detection,since the overall hue, saturation and intensity characteristics of acolor image can be readily judged by a human operator, and the value ofthe control parameter “a” can thereby be set appropriately by theoperator, to enable effective edge detection to be achieved.

A fourth embodiment of an image recognition apparatus will be described.The configuration is basically similar to that of the second embodiment(shown in FIG. 15).

The operation sequence of this embodiment is similar to that of thesecond embodiment, shown in the flow diagram of FIG. 16, with steps 11,12 and 13 being identical to those of the first embodiment. The contentsof step 20 of FIG. 16, with the fourth embodiment, differ from those ofthe second embodiment and are as follows.

Step 20: the pixel values are transformed from the RGB color space tothe coordinates of the cylindrical HSI color space shown in FIG. 20,using equation (9) as described hereinabove for the third embodiment.Equation (11) is then applied to transform the respective sets of h, s,i values obtained for each of the pixels of the color image pixel to thecoordinates of a color space of the inverted conical form shown in FIG.24, i.e., to coordinates h′, s′, i′ of a modified form of HSI colorspace. $\begin{matrix}{{{h^{\prime}\quad \left( {x,y} \right)} = {h\quad \left( {x,y} \right)}}{{s^{\prime}\quad \left( {x,y} \right)} = {{\frac{i\quad \left( {x,y} \right)}{max\_ value} \cdot s}\quad \left( {x,y} \right)}}{{i^{\prime}\quad \left( {x,y} \right)} = {i\quad \left( {x,y} \right)}}} & (11)\end{matrix}$

Thus, the color space transform operation is performed by applyingequation (11) above to convert each h(x, y), s(x, y), i(x, y) set ofvalues, for the pixel located at position (x, y) of the color image, toa set of h′(x, y), s′(x, y), i′(x, y) values respectively. Thistransform does not produce any change between h(x, y) and h′(x, y), orbetween i(x, y) and i′(x, y), however as the value of i(x, y) becomessmaller, the value of s′(x, y) is accordingly reduced.

With this embodiment, the contents of step 1010 of the flow diagram ofFIG. 16 are as follows. Respective color vectors are generated for eachof the pixels, with the vectors expressed as respective sets of linearcoordinates of an orthogonal color space, by applying equation (12)below to the set of polar coordinates h′(x, y), s′(x, y), i′(x, y) thathave been derived for the pixel by applying equation (11)$\begin{matrix}{{{PV}\quad \left( {x,y} \right)} = \begin{pmatrix}{{a \cdot s}\quad {\left( {x,y} \right) \cdot \cos}\quad \left( {h\quad \left( {x,y} \right)} \right)} \\{{a \cdot s}\quad {\left( {x,y} \right) \cdot \sin}\quad \left( {h\quad \left( {x,y} \right)} \right)} \\{i\quad \left( {x,y} \right)}\end{pmatrix}} & (12)\end{matrix}$

Thus, each color vector is generated by converting the portions h′(x,y), s′(x, y) of the h′, s′, i′ information for each pixel , i.e., thevalues that are expressed in polar coordinates, to a linear coordinatesystem. By adjusting the value of the parameter “a,” the form ofemphasis of the edge detection processing can be altered, i.e., therelative contribution of the intensity component of the color attributesof each pixel to the magnitude of the modulus of the color vector thatis derived for the pixel can be modified, by adjusting the value of thecontrol parameter “a”, so that it becomes possible to place emphasis onvariations in intensity between adjacent regions, in the edge detectionprocessing. For example if the value of the parameter “a” is made equalto 1, then edge detection processing will be performed placing equalemphasis on all of the hue, saturation and intensity values, while ifthe value of the parameter “a” is made less than 1, then edge detectionprocessing will be performed placing greater emphasis on intensityvalues.

The operation of this embodiment for generating respective color vectorscorresponding to the pixels of the color image is shown in the partialflow diagram of FIG. 27. This differs from the corresponding flowdiagram of FIG. 11 for the first embodiment in that the step 1002 of thefirst embodiment, for deriving the array of color vectors PV which areto be operated on by applying the edge templates in equation (2) asdescribed above to obtain the edge vectors EV1(x,y) to EV2(x,), isreplaced by a series of four steps, 1002 a, 1002 c, 1002 e and 1002 f.In step 1002 a, the respective sets of r, g, b values for the objectpixel and its eight adjacent surrounding pixels are obtained from thecolor image data storage section 1, and in step 1002 c each of thesesets of r, g, b values of the RGB color space is converted to acorresponding set of h, s, i values of the cylindrical-shape HSI colorspace shown in FIG. 20. In step 1002 e, each of these sets of h, s, ivalues is converted to a corresponding set of h′, s′, i′ values of theinverted-conical H′S′I′ color space. In step 1002 f, each of these setsis converted to a corresponding set of three linear coordinates, i.e.,of an orthogonal color space, while each of the resultant s′.cos h′ ands′.sin h′ values is multiplied by the control parameter “a”, asindicated by equation (12).

The remaining steps of this flow diagram, which are omitted from FIG.27, are identical to steps 1003 to 1010 of FIG. 11.

A specific example will be described in the following. In the same wayas for the third embodiment, it will be assumed that the simplifiedaerial photograph of FIG. 21 is the image that is to be subjected torecognition processing.

As described above, the RGB values of the pixels are first converted toHSI values of the cylindrical color space of FIG. 20, and these are thentransformed to H′S′I′ form, as coordinates of the inverted-conical colorspace shown in FIG. 24. The first and second columns of values in thetable of FIG. 26 show the relationship between respective HSI values foreach of the regions, and the corresponding H′S′I′ values resulting fromthe transform. In the case of the transform into the HSI space, thelower the values of intensity become, the greater will become the degreeof scattering of the values of saturation. This is a characteristicfeature of the transform from RGB to the HSI space. For example, if allof the RGB values of a pixel are small, signifying that the intensity islow, then a change of 1 in any of the RGB values will result in anabrupt change in the corresponding saturation value. Thus, since suddenchanges in color will occur at positions where such abrupt variations inthe saturation values occur, edges may be erroneously detected even atpositions where there is no actual border of any of the objects whichare to be recognized. However in the case of a transform into H′S′I′values of the inverse-conical HSI space, the lower the value ofintensity of the pixels, the smaller will become the value of s′, sothat the scattering of the values of s′ is suppressed. As a result,random abrupt changes in the magnitudes of the moduli of the colorvectors which are derived by applying equation (12) can be eliminated,enabling greater accuracy of edge detection.

FIG. 25 shows the image recognition processing results which areobtained when this embodiment is applied to edge detection of the colorimage represented in FIG. 21. The building face 1 and building face 2 inthe image of FIG. 21 are each regions of low values of intensity, sothat the noise level for these regions, due to erroneous detection ofspurious edges, could be expected to be high. However as shown in FIG.25, such noise is substantially suppressed, with the shapes of thestreet and building of the image of FIG. 21 being extracted as indicatedby numerals 54, 55 respectively.

Thus as described above, with this embodiment, when color values aretransformed into the HSI space, the saturation values are varied inaccordance with the intensity values by converting the h, s and i valuesfor each pixel to a corresponding set of values that are coordinates ofan inverted-conical shape of color space, so that the instability ofvalues of saturation that is a characteristic feature of the transformfrom RGB to HSI values can be reduced, whereby the occurrence of noisein the obtained results can be substantially suppressed, and reliableedge detection can be achieved.

A fifth embodiment of an image recognition apparatus will be described.The configuration is identical to that of the second embodiment (shownin FIG. 15).

The basic operation sequence of this embodiment is identical to that ofthe second embodiment, shown in FIG. 16. Steps 11, 12 and 13 areidentical to those of the first embodiment. With this embodiment, theoperation of step 20 of the flow diagram of FIG. 16 differs from that ofthe second embodiment, as follows. In step 20, the pixel values aretransformed from the RGB color space to coordinates of the cylindricalHSI color space shown in FIG. 20, using equation (9). Equation (13)below is then applied to transform the pixel values to the coordinatesof a color space of the double-conical form shown in FIG. 28.$\begin{matrix}{{{h^{\prime}\quad \left( {x,y} \right)} = {h\quad \left( {x,y} \right)}}{{s^{\prime}\quad \left( {x,y} \right)} = {\left( {1 - \frac{{{i\quad \left( {x,y} \right)} - {{max\_ value}/2}}}{{max\_ value}/2}} \right)s\quad \left( {x,y} \right)}}{{i^{\prime}\quad \left( {x,y} \right)} = {i\quad \left( {x,y} \right)}}} & (13)\end{matrix}$

The equation (13) effects a transform of each set of coordinates of apixel with respect to the cylindrical HSI space, i.e., h(x, y), s(x, y),i(x, y) to a corresponding set of hue, saturation and intensitycoordinates of the double-conical color space of FIG. 28, which will bedesignated as h′(x, y), s′(x, y), i′(x, y) respectively. This transformdoes not produce any change between h(x, y) and h′(x, y), or betweeni(x, y) and i′(x, y). Furthermore, if the value of i(x, y) is near theintensity value which is located midway between the maximum and minimumvalues of intensity (i.e., ½ of the white level value) there is nodifference between each value of s1(x, y) and s(x, y). However as thevalue of i(x, y) becomes greater or smaller than the intermediate value,the value of s′(x, y) is accordingly reduced in relation to s(x, y).

The operation of this embodiment for generating respective color vectorscorresponding to the pixels of the color image is shown in more detailin the flow diagram of FIG. 30. This differs from the corresponding flowdiagram of FIG. 11 for the first embodiment in that the step 1002 of thefirst embodiment, for deriving the array of color vectors PV which areto be operated on by applying the edge templates in equation (2) asdescribed above to obtain the edge vectors EV1(x,y) to EV2(x,), isdivided into four steps, 1002 a, 1002 c, 1002 g and 1002 h. In step 1002a, the respective sets of r, g, b values for the object pixel and itseight adjacent surrounding pixels are obtained from the color image datastorage section 1, and in step 1002 c each of these sets of r, g, bvalues of the RGB color space is converted to a corresponding set of h,s, i values of the cylindrical-shape HSI color space shown in FIG. 20.In step 1002 g, each of these sets of h, s, i values is converted to acorresponding set of h′, s′, i′ values of the double-conical H′S′I′color space shown in FIG. 28. In step 1002 h, each of these sets isconverted to a corresponding set of three linear coordinates, i.e., ofan orthogonal color space, by applying the processing of equation (13).

The remaining steps of this flow diagram, which are omitted from FIG.30, are identical to steps 1003 to 1010 of FIG. 11.

A specific example will be described in the following. In the same wayas for the third embodiment, it will be assumed that the simplifiedaerial photograph of FIG. 21 is the color image data that are to besubjected to recognition processing.

Firstly, the RGB values of the pixels are converted to HSI values of thecylindrical HSI color space, and these are then transformed to H′S′I′values of the double-conical color space. The first and third columns ofvalues in FIG. 26 show the relationship between respective HSI valuesfor each of the regions, and the corresponding H′S′I′ values resultingfrom a transform into the coordinates of the double-conical form ofH′S′I′ color space.

The image recognition processing results obtained when this embodimentis applied to edge detection of the color image represented in FIG. 21are as shown in FIG. 29. As can be seen, not only is the noise in thelow-intensity regions such as the building face 1 and building face 2 ofthe image of FIG. 21 reduced, but noise is also greatly reduced inhigh-intensity regions such as the building roof and the street, withthe shapes of the street and building being extracted as indicated bynumerals 56, 57 respectively.

Thus with this embodiment, saturation values are reduce in regions ofhigh or low intensity values, i.e., regions in which instability ofsaturation values can be expected to occur as a result of the transformfrom the RGB to the HSI color space. Hence, the instability ofsaturation values can be substantially reduced, so that noise caused bythese saturation values can be suppressed, and accurate edge detectioncan be achieved.

A sixth embodiment of an image recognition apparatus will be described.The configuration is identical to that of the second embodiment shown inFIG. 15, while the basic operation sequence is similar to that of thesecond embodiment, shown in the flow diagram of FIG. 16. Steps 11, 12and 13 are identical to those of the first embodiment, shown in the flowdiagram of FIG. 5. Step 10 is basically similar to that of the fourthembodiment. 12. The step of performing the transform from the RGB colorspace to a different color space (step 20 of FIG. 16) is executed asfollows with this embodiment. Firstly, the transform of the pixel valuesfrom sets of r, g, b values of the RGB color space to h, s, i values ofthe cylindrical HSI color space of FIG. 20 is performed, using equation(9) as described hereinabove for the preceding embodiment. With thesixth embodiment of the invention, the respective sets of h, s, i valuesderived for the pixels of the color image are then converted tocoordinates of a modified H′S I′ color space by applying a saturationvalue modification function, which varies in accordance with the actualchanges in the degree of sensitivity of the saturation values to smallchanges in intensity values. This function is generated and utilized asfollows:

(1) The first step is to derive, for each of the possible values ofintensity i, all of the sets of (r, g, b) values which will generatethat value of i when the transform from the RGB to HSI color space isperformed. That is, for each intensity value i(n), where n is in therange from the minimum to maximum (e.g., 255) values, a correspondinggroup of sets of (r, g, b) values are derived.

(2) For each intensity value, a corresponding set of values of afunction which will be designated as f1(r,g,b) are derived. Theseexpress, for each of the sets of (r, g, b) values, the amount of changewhich would occur in the corresponding value of saturation s, if thevalue of the red component r were to be altered in the range ±1. Eachvalue of f1(r,g,b) is calculated as follows: $\begin{matrix}{{{{f1}\quad \left( {r,g,b} \right)} = {{{{{s\quad \left( {{r + 1},g,b} \right)} - {s\quad \left( {r,g,b} \right)}}}\quad {if}\quad r} = 0}}{{{f1}\quad \left( {r,g,b} \right)} = {{\frac{{{{s\quad \left( {{r + 1},g,b} \right)} - {s\quad \left( {r,g,b} \right)}}} + {{{s\quad \left( {r,g,b} \right)} - {s\quad \left( {{r - 1},g,b} \right)}}}}{2}\quad {if}\quad 0} < r < {max\_ value}}}{{{f1}\quad \left( {r,g,b} \right)} = {{{{{s\quad \left( {r,g,b} \right)} - {s\quad \left( {{r - 1},g,b} \right)}}}\quad {if}\quad r} = 0}}} & \text{(14a)}\end{matrix}$

(3) Next, for each of the possible values of intensity i, the average ofthe corresponding set of values of f1(r,g,b) is obtained, i.e., afunction of i is obtained which will be designated as f2(i). Designatingthe total number of sets of (r,g,b) values corresponding to a value ofintensity i as k(i), this can be expressed as: $\begin{matrix}{{{f2}\quad (i)} = \frac{\sum\limits_{({{{all}\quad {combinations}\quad {of}\quad r},g,{b\quad {values}\quad {which}\quad {result}\quad {in}\quad {intensity}\quad {value}\quad i}})}^{\quad}\quad {{f2}\quad \left( {r,g,b} \right)}}{k\quad (i)}} & \text{(14b)}\end{matrix}$

where Σf2(r,g,b) signifies, for each value of i, the sum of all of thevalues obtained as f2(i) for that value of i, i.e., derived from all ofthe k sets of (r,g,b) value combinations which will result in that valueof i when a transform from RGB to HSI coordinates is performed.

(4) The required saturation value modification function f(i) is thenobtained as follows, designating the minimum value obtained for f2(i) asmin f2(i), and the maximum possible value of i as max_value:$\begin{matrix}{{f\quad (i)} = {\frac{\min \quad {f2}\quad (i)}{{f2}\quad (i)}{max\_ value}}} & \text{(14c)}\end{matrix}$

The function f(i) is shown in FIG. 31. The higher the value of f(i)obtained from equation (14c) above, the greater will be the stability ofthe s values with respect to changes in the value of the red componentr, and the function is derived on the assumption that such stabilityalso corresponds to stability with respect to changes in the intensitycomponent i. Conversely, the lower the value of f(i), the greater willbe the degree of instability of s of with respect to changes in thevalue of r, and hence with respect to changes in the value of i.

That is to say, it is assumed that the values of saturation s will tendto be unstable in regions of the color image where the values of the redcomponent r are high, and also in regions where the values of r are low.Next, using equations (15) below, the respective sets of h, s, i valuesof the HSI cylindrical color space derived for the pixels of the colorimage are transformed into corresponding sets of coordinates h′,s′,i′ ofthe modified cylindrical type of color space shown in FIG. 32, byapplying the function f(i) derived above. It can be understood that theshape of this modified cylindrical color space is formed by rotating thegraph of the function f(i) shown in FIG. 31 about its i-axis.$\begin{matrix}{{{h^{\prime}\quad \left( {x,y} \right)} = {h\quad \left( {x,y} \right)}}{{s^{\prime}\quad \left( {x,y} \right)} = {\frac{f\quad \left( \left( {i\quad \left( {x,y} \right)} \right) \right.}{max\_ value}\quad s\quad \left( {x,{{yi^{\prime}\quad \left( {x,y} \right)} = {i\quad \left( {x,y} \right)}}} \right.}}} & (15)\end{matrix}$

The operation of this embodiment for generating respective color vectorscorresponding to the pixels of the color image is shown in the partialflow diagram of FIG. 34. This differs from the corresponding flowdiagram of FIG. 11 for the first embodiment in that the step 1002 of thefirst embodiment, for deriving the array of color vectors PV is replacedby a series of four steps, 1002 a, 1002 c, 1002 i and 1002 j. In step1002a, the respective sets of r, g, b values for the object pixel andits eight adjacent surrounding pixels are obtained from the color imagedata storage section 1, and in step 1002c each of these sets of r, g, bvalues of the RGB color space is converted to a corresponding set of h,s, i values of the cylindrical-shape HSI color space shown in FIG. 20.In step 1002 i, each of these sets of h, s, i values is converted to acorresponding set of h′, s′, i′ values of the modified conical H′S′I′color space shown in FIG. 32, by applying equation (15). In step 1002 j,each of these sets is converted to a corresponding set of three linearcoordinates, i.e., of an orthogonal color space, while each of theresultant s′.cos h′ and s′.sin h′ values is multiplied by the controlparameter “a”, as indicated by equation (12.

The remaining steps of this flow diagram, which are omitted from FIG.34, are identical to steps 1003 to 1010 of FIG. 11.

A specific example will be described in the following. In the same wayas for the third embodiment, it will be assumed that the simplifiedaerial photograph of FIG. 21 constitutes the color image data that areto be subjected to recognition processing.

With this embodiment, step 20 of FIG. 16, for conversion to a differentcolor space, is executed as follows. The RGB values of the pixels areconverted to respective sets of h, s, i values of the cylindrical HSIcolor space of FIG. 20, and these are then transformed to h′, s′, i′coordinates of the modified cylindrical color space shown in FIG. 32, byapplying the aforementioned function f(i). The contents of the first andfourth columns of values in the table of FIG. 26 show the relationshipbetween respective HSI values for each of the regions of the color imageof FIG. 21, and the corresponding H′S′I′ values resulting from atransform into the coordinates of the modified cylindrical color space.

FIG. 33 shows the results of image recognition processing obtained whenthis embodiment is applied to the color image represented in FIG. 21. Asshown, in addition to reducing noise in regions of low intensity, suchas the building face 1 and the building face 2, noise is greatly reducedin regions of high intensity such as the building roof and the road. Inaddition, the shapes of the road and building are very accuratelyobtained, as indicated by numerals 58 and 59 respectively, without anyinterruptions in the continuity of the edges.

It can thus be understood that with this embodiment, when the colorvalues of the image are transformed from the RGB to respective sets ofh, s, i values that are coordinates of an HSI color space, thesecoordinates are then modified by applying a predetermined function suchthat the intensity values are appropriately reduced in those regions ofthe image where instability of the saturation values would otherwiseoccur. The function which is utilized for performing this modificationof the intensity values is derived on the basis of calculating actualamounts of variation in saturation value that will occur in response tospecific small-scale changes in one of the r, g, or b values, for eachpoint in the RGB color space.

Hence, compensation of the intensity values is applied in an optimummanner, i.e. by appropriate amounts, and only to those regions whereinstability of the saturation values would otherwise occur. This enablesthe generation of noise to be effectively suppressed, while at the sametime enabling accurate detection of edges to be achieved, since thestability of saturation values is achieved while ensuring that themaximum possible amount of contribution to the magnitude of each colorvector will be made by the corresponding set of h′, s′ and i′ values.That is to say, the maximum possible amount of color information is usedin the edge detection processing, consistent with stability of thesaturation values and resultant elimination of noise from the edgedetection results.

A seventh embodiment of an image recognition apparatus is shown in FIG.35. The apparatus is made up of a region data storage section 4 havingshape data which express only respective regions of an image, i.e.formed of labelled outlines of regions appearing in an image, such asare generated by the preceding embodiments) with that labelled imagebeing referred to in the following as a region image, an imagerecognition processing section 2 for performing image recognition ofimage data, and a combination-processed shape data storage section 5 forstoring modified shape data which have been formed by the imagerecognition processing section 2 through combining of certain ones ofthe regions expressed in the shape data held in the region data storagesection 4.

It should be understood that the term “image recognition” as appliedherein to the operation of the image recognition processing section 2signifies a form of processing for recognizing certain regions within animage which should be combined with other regions of that image, andexecuting such processing.

As shown in FIG. 35 the image recognition processing section 2 is formedof a small region detection section 26, a combination object regiondetermining section 27 and a region combination processing section 28.The small region detection section 26 performs selection of certainregions of the image whose shape data are held in the region datastorage section 4, based upon criteria described hereinafter. Thecombination object region determining section 27 determines those of theregions selected by the small region detection section 26 which are tobe mutually combined, and the region combination processing section 28performs the actual combination of these regions. The combination objectregion determining section 27 includes a small region determiningsection, which compares the lengths of the respective common borderlines between a selected region and each of the regions which areimmediately adjacent to that selected region, and determines the one ofthese adjacent regions which has the greatest length of common borderline with respect to the selected region.

FIG. 36 shows an example of a region image whose data are stored in theregion data storage section 4.

Labels such as “1” and “2” are attached to each of the pixels, as shownin the left side of FIG. 36. All of the pixels located within a specificregion have the same label, i.e., there is a region containing onlypixels having the label 1, a region containing only pixels having thelabel 2, and so on.

Various techniques are known for separating the contents of an imageinto various regions. One method of defining a region is to select apixel in the image, determine those immediately adjacent pixels whosecolor attributes are sufficiently close to those of the first pixel,within a predetermined range, and to successively expand this processoutwards, to thereby determine all of the pixels which constitute oneregion. Another method is to apply edge detection processing to theimage, and to thereby define each region as a set of pixels which areenclosed within a continuously extending edge.

With this embodiment, there is no particular limitation on the processof generating the region image that is stored in the region data storagesection 4.

The fundamental feature of the embodiment is that selected smallregions, which constitute noise in the image that is stored in theregion data storage section 4, are combined with adjacent largerregions, or small regions are mutually combined, to thereby eliminatethe small regions and so reduce the level of noise in the region image.Two regions are combined by converting the pixel labels of one of theregions to become identical to the labels of the other region. Theresultant region data, which express the shapes of objects asrespectively different regions, are then stored in thecombination-processed shape data storage section 5.

FIG. 37 is a flow diagram showing the basic features of the operation ofthis embodiment. The contents are as follows. Step 70: a decision ismade as to whether there is a set of one or more small regions withinthe image which each have an area which is smaller than s pixels, wheres is a predetermined threshold value. If such a region is found, thenoperation proceeds to step 71. If not, i.e., if it is judged that allsmall regions have been eliminated, then operation is ended. Step 71: aregion r is arbitrarily selected, as the next small region that is to besubjected to region combination, from among the set of small regionswhich each have an area that is less than s pixels. Step 72: for each ofthe regions r1, r2, . . . rn that are respectively immediately adjacentto the region r, the length of common boundary between that adjacentregion and the region r is calculated. Step 73: the region ri that isimmediately adjacent to the region r and has the longest value of commonboundary line with the region r is selected. Step 74: the regions r andri are combined to form a new region r′.

A specific example will be described. It will be assumed that the regioncombination processing is to be applied to the region image that isshown in the upper part of FIG. 38. The image contains regions R, R1, R2and R3. A vehicle 102 is represented by region R, while a street 100 isrepresented by the region R1. Since the area of the region R is lessthan s pixels, this region is to be deleted.

There are two regions which are respectively immediately adjacent to theregion R, i.e., the regions R1 and R2. The respective lengths of commonboundary line between these regions R1, R2 and the region R areobtained, and it is found that the length of common boundary line withrespect to the region R1 is longer than that with respect to R2. Theregion R1 is therefore selected to be combined with the region R. R andR1 are then combined to form a new region, which is designated as R1′,as shown in the lower part of FIG. 38. In that way, the regionrepresenting a vehicle has been removed from the region image whose datawill be stored in the combination-processed shape data storage section5.

It can be understood that if the pixel values (of the original colorimage corresponding to the region image) within the region R were closeto those in the region R2, i.e., if these two regions were closelysimilar in color, and the regions R and R2 were to be combined on thebasis of their closeness of color values, this would result in thestreet attaining an unnatural shape.

With the embodiment described above, a color image that has already beendivided into regions is subjected to processing without consideration ofthe pixel values in the original color image, i.e., processing that isbased only upon the shapes of regions in the image, such as to combinecertain regions which have a common boundary line. As a result, smallregions which constitute noise can be removed, without lowering theaccuracy of extracting shapes of objects which are to be recognized. Inparticular, in the case of processing image data of an aerial photographof a city, it is possible to eliminate the shapes of vehicles onstreets, without lowering the accuracy of extracting the shapes of thestreets.

An eighth embodiment of an image recognition apparatus will bedescribed. The configuration is identical to that of the seventhembodiment (shown in FIG. 35).

The operation sequence of this eighth embodiment is shown in FIG. 40.This operation is basically similar to that of the seventh embodiment,shown in the flow chart of FIG. 37, with steps 70, 72, 73, 74 beingidentical to those of the seventh embodiment, however the contents ofstep 71 are replaced by those of step 171 in FIG. 40. specifically, instep 171 of this embodiment, the region r having the smallest area ofall of the regions of the image which have an area of less than s pixels(as determined in step 70) is selected, and step 72 is then applied tothat region r.

A specific example will be described in the following. It will beassumed that the region image shown in the upper part of FIG. 39,representing a building 109 surrounded by a ground area, is to besubjected to combination processing for extracting only the shape of thebuilding roof. There are four regions in the image, R1, R2, R3 and R4with R4 being the ground, R3 being a part of the roof of the building109 which is not covered by rooftop structures, and R1, R2 beingrespective regions corresponding to first and second rooftop structures110, 111 which are formed upon the roof of building 109. The areas ofeach of R1 and R2 is less than s pixels. Since R1 has the smallest areaof all of the regions that are smaller than s pixels, as shown in themiddle portion of FIG. 39, Ri and R3 are combined to obtain the regionR3′. As a result, R2 becomes the region having the smallest area, of theregions R2, R3′ and R4. Hence, R2 and R3′ are combined, to generate aregion R3″. Since the size of each of the remaining regions R3″ and R4is greater than s pixels, the combining processing operation is thenhalted.

In that way, the rooftop structures on the building are eliminated fromthe image, so that only the shape of the building itself will beextracted.

It should be noted that if this combining of regions had been executedin the sequence R2, R1, with R2 being combined with R4 and Ri beingcombined with R3, it would be impossible to accurately extract the shapeof the building.

Thus with this embodiment, combining processing is repetitively appliedto each of the regions that are below a predetermined size, such as tocombine the region having the smallest area with another region.

As a result, small regions which constitute noise can be removed,without lowering the accuracy of extracting shapes for the purpose ofobject recognition. In particular, in the case of applying suchprocessing to image data of an aerial photograph of a city, (i.e., inwhich, as opposed to the usual type of housing, there will frequently becomplex structures formed upon the roofs of buildings) this embodimentwill enable the shapes of the buildings to be accurately extracted.

A ninth embodiment of an image recognition apparatus will be described.The configuration is identical to that of the seventh embodiment (shownin FIG. 35).

The operation sequence of this ninth embodiment is shown in the flowdiagram of FIG. 42. This is basically similar to that of the seventhembodiment shown in the flow chart of FIG. 37, with steps 70, 72, 73, 74being identical to those of the seventh embodiment. However with thisninth embodiment, step 71 of FIG. 37 is replaced by two successive steps271 a, 271 b, executed as follows.

Step 271 a: for each region having an area that is smaller than spixels, where s is the aforementioned threshold value, the total of theareas of all of the immediately adjacent regions is obtained.

Step 271 b: the region r, for which the total of the areas of theimmediately adjacent regions is a minimum, is selected to be processedin step 72.

A specific example will be described in the following. It will beassumed that the region in the upper part of FIG. 41 is to be subjectedto combination processing. There are four regions in the image, R1, R2,R3 and R4, with R4 being the surrounding ground, R1 and R2 are regionscorresponding to first and second structures 112, 113 formed on the roofof building 109, and R3 is the region of that roof which is not coveredby these structures. The area of each of R1 and R2 is less than spixels. The aforementioned sums of areas of immediately adjacent regionsare obtained as follows. The sum of the areas which are immediatelyadjacent to R1 is the total area of R2 and R3, while the sum of suchadjacent areas, in the case of R2, is the total area of R1, R3 and R4.Of these two total areas of adjacent regions, the smaller of the twovalues is obtained for the case of region R1. Thus, as shown in themiddle part of FIG. 41, the regions R3 and R1 are combined to form theregion R3′. In the next repetition of step 71, it is found that there isonly a single region which is smaller than s pixels, and that this isimmediately adjacent to the regions R3′ and R4. Since R3′ is the smallerof these adjacent regions, R3 and R3′ are combined to form a region R3″.Since the size of that region is greater than s pixels, the combiningprocessing operation is then halted.

In that way, the structures on the building roof having been eliminated,leaving only the outline of the building roof itself.

It should be noted that if this combining of regions had been executedin the sequence R2, R1, with R2 being combined with R4 and R1 beingcombined with R3, it would be impossible to accurately extract the shapeof the building.

Thus with this embodiment, combining processing is repetitively executedsuch as to combine the region which is below the threshold value of size(s pixels) and for which the total area of the immediately adjacentregions is the smallest, with another region. As a result, small regionswhich constitute noise can be removed, without lowering the accuracy ofextracting shapes for the purpose of object recognition. In particularin the case of applying such processing, whereby combining processingsuccessively occurs from the interior of the outline of a building tothe periphery of the building, to image data of an aerial photograph ofa city in which there will be many complex rooftop configurations, thisembodiment will enable the shapes of the buildings to be accuratelyextracted.

In the description of the preceding embodiments it has been assumed thatthe small region detection section 26 shown in FIG. 5 determines theregions which are to be classified as part of the set of small regions(i.e., that are to be subjected to region combination processing) basedupon whether or not the total area of a region is above a predeterminedthreshold value (s pixels). However it should be noted that theinvention is not limited to this method, and other types of criteria forselecting these small regions could be envisaged, depending upon therequirements of a particular application. For example, it might bepredetermined that regions which are narrower than a predetermined limitare to be combined with other regions, irrespective of total area. Itshould thus be understood that various modifications to the embodimentsdescribed above could be envisaged, which fall within the scope claimedfor the present invention.

A tenth embodiment of an image recognition apparatus according to thepresent ′ invention will be described. As shown in FIG. 43, this isformed of a color image data storage section 1 which stores color imagedata, an image recognition processing section 2 for performing imagerecognition processing of the color image data, and acombination-processed shape data storage section 5 for storing shapedata expressing a region image, extracted by the image recognitionprocessing section 2.

The image recognition processing section 2 of this embodiment is made upof a color space coordinates conversion section 25, color vector datagenerating section 21, edge template application section 22, edgestrength and direction determining section 23, an edge pixel determiningsection 24 for extracting shape data expressing an edge image asdescribed hereinabove referring to FIG. 16, a small region detectionsection 26, a combination object region determining section 27, and aregion combination processing section 28 for performing region combiningprocessing as described hereinabove referring to FIG. 35, and an edgedata-region data conversion section 29.

The color space coordinates conversion section 25 converts the RGB datathat are stored in the color image data storage section 1 to coordinatesof an appropriate color space (i.e., whereby intensity and chrominanceinformation are expressed respectively separately). The color vectordata generating section 21 generates respective color vectors, eachexpressed by a plurality of scalar value, corresponding to the pixels ofthe original color image, from the transformed image data. The edgetemplate application section 22 applies edge templates to the pixelvector data, to generate edge vector data. The edge strength anddirection determining section 23 determines the edge strength and theedge direction information, based on the magnitudes of the edge vectormoduli, as described hereinabove for the first embodiment, with the edgepixel determining section 24 determining those pixels which are locatedon edges within the color image, based on the edge strength anddirection information, to thereby obtain shaped data expressing an edgeimage. The edge data-region data conversion section 29 converts the edgeimage data into shape data expressing a region image. The small regiondetection section 26 selects a set of small regions which are each to besubjected to region combination processing, and the combination objectregion determining section 27 determines the next one of that set ofsmall regions that is to be subjected to the region combinationprocessing. The combination object region determining section 27operates on that small region, to determine the respective lengths ofthe common border lines between that small region and each of itsimmediately adjacent regions, and combines the small region with theadjacent region having the greatest length of common border line withthe small region.

FIG. 44 is a flow diagram of the operating sequence of the apparatus ofthe embodiment of FIG. 10.

The processing of the sequence of steps 20, 10, 11, 12, and 13 isidentical to that shown in FIG. 16 of the second embodiment, describedhereinabove, so that detailed description will be omitted. Similarly,the processing executed in the sequence of steps 70, 72, 73, 74 isidentical to shown in FIG. 37 for the seventh embodiment. In step 100,the data expressing the edge image are converted to data expressing aregion image. This is done by dividing the edge image into regions, eachformed of a continuously extending set of pixels that are surrounded byedge pixels, and applying a common label to each of the pixels of such aregion as described hereinabove referring to FIG. 36, i.e., applyingrespectively different labels to identify the various regions.

A specific example will be described, assuming that the simplifiedaerial photograph which is represented in the upper part of FIG. 45 isthe color image whose data that are to be subjected to recognitionprocessing by this embodiment. This image contains a road 122, twovehicles 121 and a building 120. When edge detection is applied to thisimage, using respective pluralities of scalar values of the pixels ofthe color image data, the results are as shown in the middle part ofFIG. 45. As shown, edge data are detected for the road, the vehicles andthe building, respectively, so that the shapes 123 of the vehiclesappear in the street. The data of that edge image are then converted todata of a region image as described above, and region combining isapplied based upon the shapes of the regions, without consideration ofthe values of pixels within the regions. The result obtained is as shownin the lower part of FIG. 45. As shown, the vehicles have beeneliminated, leaving the shape 124 of the road accurately represented.

The upper part of FIG. 46 shows an edge image that has been obtained byapplying edge detection by an embodiment of the present invention to acolor image which is an actual aerial photograph containing variousroads and buildings and many vehicles. Numeral 130 indicates varioussmall regions appearing in the edge image which correspond to theoutlines of respective vehicles, while the larger rectangular regionsdesignated by numeral 131 correspond to buildings. In the originalphotograph there is almost no difference in intensity between thebuilding roofs and the surrounding ground surface. Hence, if prior artmethods of image recognition were to be applied in this instance, itwould be difficult to detect the shapes of the edges of the buildings.However by applying the present invention, the building edges areaccurately detected.

The edge image is then converted to a region image, and regioncombination is applied to that region image as described above, i.e.,with the combination processing being based upon the shapes of theregions, without consideration of the values of pixels within theregions, and with the aforementioned threshold value s being set to anappropriate value for substantially eliminating the small regions 130which correspond to vehicles.

The result obtained is as shown in the lower part of FIG. 46. As shown,the shapes of many vehicles have been eliminated, thereby enabling thebuildings to be more easily recognized, without reducing the accuracy ofextracting the shapes of the buildings.

As can be understood from the above description of embodiments,according to one basic aspect, the present invention provides an imagerecognition method and image recognition apparatus whereby the edges ofregions expressing objects appearing in a color image can be accuratelyand reliably detected. This is based upon expressing the colorattributes of each pixel of the image as a plurality of scalar valuesexpressing a color vector, and the use of edge vectors corresponding torespective ones of a plurality of predetermined edge directions (i.e.,specific orientation angles within an image). The pixels of the colorimage are selective processed to derive a corresponding set of edgevectors, with each edge vector being a vector quantity which isindicative of an amount of variation in color between pixels which arelocated on opposite sides of a line extending through the selected pixeland extending in the corresponding edge direction. Each edge vector isderived in a simple manner by performing an array multiplicationoperation between an edge template and an array of color vectorscentered on the selected pixel, and obtaining the vector sum of theresult. With the described embodiments, this operation is equivalent toselecting first and second sets of pixels that are located onrespectively opposing sides of the selected pixel, with respect to aspecific edge direction, obtaining respective weighted vector sums ofthe color vectors of these two sets, and obtaining the vector differencebetween these sums. The edge direction corresponding to the edge vectorhaving the largest modulus of the resultant set of edge vectors obtainedfor the selected pixel (that largest value being referred to as the edgestrength) is thereby obtained as the most probable edge direction onwhich that pixel is located, and it thereby becomes possible to reliablydetect those pixels which actually are located on edges, based oncomparisons of respective values of edge strength of adjacent pixels,and also to obtain the direction of such an edge.

According to a second basic aspect of the invention, a region imagewhich expresses an image as a plurality of respectively identifiedregions can be processed to eliminate specific small regions which arenot intended to be identified, and which therefore constitute noise withrespect to an image recognition function. This is achieved by firstdetecting the set of small regions which are each to be eliminated bybeing combined with an adjacent region, then determining the next one ofthat set which is to be subjected to the combination processing, withthat determination being based upon specific criteria which are designedto prevent the combination of the small regions having the effect ofdistorting the shapes of larger regions which are to be recognized. Thesmall region thus determined is then combined with an adjacent region,with that adjacent region also being selected such as to reduce thepossibility of distortion of regions which are intended to berecognized. In that way, the disadvantages of prior art methods ofreducing such small regions, such as by various forms of filterprocessing, can thereby be effectively overcome.

What is claimed is:
 1. An image recognition method of processing imagedata of a color image which is represented as respective sets of colorattribute data of an array of pixels, to successively operate on each ofsaid pixels as an object pixel in order to determine whether said objectpixel is located on an edge within said color image, and thereby deriveshape data expressing an edge image corresponding to said color image,the method comprising steps of: expressing said sets of color attributedata of each of said,pixels as respective color vectors, with each saidcolor vector defined by a plurality of scalar values which arecoordinates of an orthogonal color space; for each of a plurality ofpredetermined edge directions, generating corresponding edge templatesas an array of respectively predetermined numeric values; extracting anarray of color vectors as respective color vectors of a sub-array ofsaid pixels, said sub-array of pixels being centered on said objectpixel; successively applying each of said edge templates to said arrayof color vectors in a predetermined array processing operation, toderive edge vectors respectively corresponding to said edge directions;comparing the respective moduli of said derived edge vectors to obtain avalue of edge strength for said object pixel, as a maximum value ofmoduilus of said edge vectors, and obtaining a possible edge directionfor said object pixel as a direction corresponding to an edge vectorhaving said maximum value of modulus; and judging whether said objectpixel is located on an actual ledge which is oriented in said possibleedge direction, based upon comparing said edge strength of said objectpixel with respective values of edge strength derived for pixelsdisposed adjacent to said object pixel.
 2. The image recognition methodaccording to claim 1, wherein said step of judging whether said objectpixel is located on an actual edge which is oriented in said possibleedge direction comprises comparing said edge strength of said objectpixel with a predetermined threshold value and with respective values ofedge strength of first and second adjacent pixels, said first and secondadjacent pixels being located immediately adjacent to said object pixeland on opposing sides of said object pixel with respect to said possibleedge direction, and judging that said object pixel is located on anactual edge which is oriented in said possible edge direction when it isfound that said edge strength of said object pixel exceeds saidthreshold value and also exceeds said respective values of edge strengthof said first and second adjacent pixels.
 3. The image recognitionmethod according to claim 1, wherein said numeric values constitutingeach of said edge templates include positive and negative values whichare respectively disposed symmetrically opposite in relation to saidcorresponding edge direction within said edge template, and wherein saidstep of applying an edge template comprises performing an arraymultiplication operation between said edge template and said array ofcolor vectors, and obtaining the vector sum of a result of said arraymultiplication operation as an edge vector.
 4. The image recognitionmethod according to claim 1, wherein said step of comparing the moduliof said derived edge vectors to obtain said value of edge strength ofsaid object pixel comprises: based on results of said comparison,selectively determining that said moduli have a first relationshipwhereby there is only a single maximum one of said modului, a secondrelationship whereby all of said moduli have an identical value, or athird relationship whereby a plurality of said moduli are greater thanremaining one (s) of said moduli; when said first relationship isdetermined, registering said maximum modulus as said value of edgestrength of said object pixel, and registering information specifying adirection corresponding to the edge vector having said maximum modulusas the possible edge direction of said object pixel; when said secondrelationship is determined, registering said identical value of modulusas said value of edge strength of said object pixel; and when said thirdrelationship is determined, arbitrarily selecting an edge vector havingsaid greater value of modulus, registering said modulus value as saidvalue of edge strength of said object pixel, and registering informationfor specifying a direction which corresponds to said selected edgevector as the possible edge direction of said object pixel.
 5. The imagerecognition method according to claim 1, wherein said step of comparingthe moduli of said derived edge vectors to obtain said value of edgestrength of said object pixel comprises: based on results of saidcomparison, selectively determining that said moduli have: a firstrelationship whereby there is only a single maximum one of said moduli,a second relationship whereby all of said moduli have an identicalvalue, or a third relationship whereby a plurality of said moduli aregreater than remaining one(s) of said moduli; when said firstrelationship is determined, registering said maximum modulus as saidvalue of edge strength of said object pixel, and registering informationspecifying a direction corresponding to the edge vector having saidmaximum modulus, as a single candidate edge direction of said objectpixel; when said second relationship is determined, registering saididentical value of modulus as said value of edge strength of said objectpixel; and when said third relationship is determined, registering saidgreater value of modulus as said value of edge strength of said objectpixel, and registering information specifying each of respectivedirections corresponding to each of said plurality of edge vectorshaving said greater value of modulus, as respective candidate edgedirections of said object pixel; and wherein said step of judgingwhether said object pixel is located on an actual edge is performed bysuccessively utilizing each of said candidate edge directions, until anactual edge is detected or all of said candidate edge directions havebeen utilized.
 6. The image recognition method according to claim 1,wherein said step of expressing said sets of color attribute data asrespective color vectors comprises performing a transform processingoperation on each of said sets of color attribute data to derive acorresponding plurality of scalar values which constitute a set ofcoordinates of a predetermined color space.
 7. The image recognitionmethod according to claim 6, wherein said predetermined color space isan HSI (hue, saturation, intensity) color space.
 8. The imagerecognition method according to claim 7, wherein said coordinates ofsaid HSI color space are obtained in the form of polar coordinates, andfurther comprising a step of converting each said set of polarcoordinates to a corresponding plurality of scalar values which arelinear coordinates of an orthogonal color space.
 9. The imagerecognition method according to claim 8, wherein said set of linearcoordinates obtained corresponding to each of said pixels is derivedsuch that an intensity value for said pixel is expressed by a specificone of said set of coordinates while hue and saturation values for saidpixel are expressed by other ones of said set of coordinates, andfurther comprising a step of multiplying at least one of saidcoordinates of said set by an arbitrarily determined parameter valuesuch as to alter a relationship between respective magnitudes of saidintensity value and said hue and saturation values.
 10. The imagerecognition method according to claim 7, further comprising a step ofconverting each of said sets of coordinates of said pixels for said HSIcolor space to a corresponding set of coordinates of a modified HSIcolor space, such that saturation values expressed in said modified HSIcolor space are modified in accordance with corresponding intensityvalues.
 11. The image recognition method according to claim 10, whereinsaid saturation values in the modified HSI color space are decreased inaccordance with decreases in corresponding intensity values, in relationto saturation values in said HSI color space.
 12. The image recognitionmethod according to claim 10, wherein said saturation values in themodified HSI color space are decreased in relation to saturation valuesin said HSI color space, in accordance with increases in correspondingintensity values from a predetermined median intensity value, and aremoreover decreased in relation to saturation values in said HSI colorspace in accordance with decreases in corresponding intensity valuesfrom said predetermined median intensity value.
 13. The imagerecognition method according to claim 10, wherein said step ofconverting each of said sets of coordinates of said pixels for said HSIcolor space to a corresponding set of coordinates of the modified HSIcolor space comprises applying a predetermined modification function toeach of respective saturation values of said HSI color space to obtainmodified saturation values.
 14. The image recognition method accordingto claim 13, wherein said modification function is derived beforehandbased upon a relationship between the intensity values and correspondingsaturation values which are obtained by a transform into an HSI spacehaving a specific size, with each of respective hue, saturation andintensity values expressed as a specific number of data bits.
 15. Amethod of deriving for a selected pixel of a color image that is part ofan array of pixels, for each of a plurality of predetermined edgedirections, an edge strength value that corresponds to a specific one ofa plurality of predetermined edge directions and is indicative of adegree of probability that said selected pixel is located on an edgebetween regions of respectively different color within said image, withsaid edge being oriented in said specific edge direction, the methodcomprising a set of steps performed for each of said edge directions of:expressing color attributes of each of said pixels of said color imageas a plurality of scalar values representing a color vector within anorthogonal color space; obtaining a first weighted vector sum of a firstset of pixels which are located adjacent to said selected pixel on oneside thereof with respect to said specific edge direction and a secondweighted vector sum of a second set of pixels which are located adjacentto said selected pixel on an opposite side from said first set withrespect to said specific edge direction, and deriving the vectordifference between said first and second weighted vector sums; andobtaining a modulus of said vector difference, and a step of judging therespective moduli thereby obtained respectively corresponding to saidpredetermined edge directions, to obtain said edge strength value as alargest one of said moduli.
 16. An image recognition apparatus forprocessing image data of a color image which is represented asrespective sets of color attribute data of an array of pixels, tosuccessively operate on each of said pixels as an object pixel in orderto determine whether said object pixel is located on an edge within saidcolor image, and thereby derive shape data-expressing an edge imagecorresponding to said color image, the apparatus comprising: colorvector generating means for expressing said sets ofcolor attribute dataof each of said pixels as respective color vectors, with each said colorvector in the form of an array of a plurality of scalar values which arecoordinates of an orthogonal color space; edge template applicationmeans for generating a plurality of edge templates each formed of anarray of respectively predetermined numeric values, with said edgetemplates corresponding to respective ones of a plurality ofpredetermined edge directions, thereby extracting an array of colorvectors as respective color vectors of a sub-array of said pixels, withsaid sub-array of pixels being centered on said object pixel, andsuccessively applying each of said edge templates to said array of colorvectors in a predetermined array 5processing operation, to derive edgevectors respectively corresponding to said edge directions; edge pixeldetermining means for comparing the respective moduli of said derivededge vectors to obtain a value of edge strength for said object pixel,as a maximum value of modulus of said edge vectors, thereby obtaining apossible edge direction for said object pixel as a directioncorresponding to an edge vector having said maximum: value of modulus,and for judging whether said object pixel is located on an actual edgethat is oriented in said possible edge direction, based upon comparingsaid edge strength of said object pixel with respective values of edgestrength derived for pixels disposed adjacent to said object pixel. 17.The image recognition apparatus according to claim 16, wherein saidoperation of judging whether said object pixel is located on an actualedge which is oriented in said possible edge direction comprisescomparing said edge strength of said object pixel with a predeterminedthreshold value and with respective values of edge strength of of firstand second adjacent pixels, said first and second adjacent pixels beinglocated immediately adjacent to said object pixel and on opposing sidesof said object pixel with respect to said possible edge direction, andjudging that said object pixel is located on an actual edge which isoriented in said possible edge direction when it is found that said edgestrength of said object pixel exceeds said threshold value and alsoexceeds said respective values of edge strength of said first and secondadjacent pixels.
 18. The image recognition apparatus according to claim16, wherein said numeric values constituting each of said edge templatesinclude positive and negative values which are respectively disposedsymmetrically opposite in relation to said corresponding edge directionwithin said edge template, and wherein said operation of applying anedge template is executed by performing an array multiplicationoperation between said edge template and said array of color vectors,and obtaining the vector sum of a result of said array multiplicationoperation as an edge vector.
 19. The image recognition apparatusaccording to claim 16, wherein said operation of comparing the moduli ofsaid derived edge vectors to obtain said value of edge strength of saidobject pixel comprises: based on results of said comparison, selectivelydetermining that said moduli have: a first relationship whereby there isonly a single maximum one of said moduli, a second relationship wherebyall of said moduli have an identical value, or a third relationshipwhereby a plurality of said moduli are greater than remaining one (s) ofsaid moduli; when said first relationship is determined, registeringsaid maximum modulus as said value of edge strength of said objectpixel, and registering information specifying a direction correspondingto the edge vector having said maximum modulus as the possible edgedirection of said object pixel; when said second relationship isdetermined, registering said identical value of modulus as said value ofedge strength of said object pixel; and when said third relationship isdetermined, arbitrarily selecting an edge vector having said greatervalue of modulus, registering said modulus value as said value of edgestrength of said object pixel, and registering information thatspecifies that a direction corresponding to said selected edge vector isa possible edge direction of said object pixel.
 20. The imagerecognition apparatus according to claim 16, wherein said operation ofcomparing the moduli of said derived edge vectors to obtain said valueof edge strength of said object pixel comprises: based on results ofsaid comparison, selectively determining that said moduli have a firstrelationship whereby there is only a single maximum one of said moduli,a second relationship whereby all of said moduli have an identicalvalue, or a third relationship whereby a plurality of said moduli aregreater than remaining one (s) of said moduli; when said firstrelationship is determined, registering said maximum modulus as saidvalue of edge strength of said object pixel, and registering informationspecifying a direction corresponding to the edge vector having saidmaximum modulus, as a single candidate edge direction of said objectpixel; when said second relationship is determined, registering saididentical value of modulus as said value of edge strength of said objectpixel; and when said third relationship is determined, registering saidgreater value of modulus as said value of edge strength of said objectpixel, and registering information specifying each of respectivedirections corresponding to each of said plurality of edge vectorshaving said greater value of modulus, as respective candidate edgedirections of said object pixel; and wherein said operation of judgingwhether said object pixel is located on an actual edge is performed bysuccessively utilizing each of said candidate edge directions, until anactual edge is detected or all of said candidate edge directions havebeen utilized.
 21. The image recognition apparatus according to claim16, wherein said operation of expressing said sets of color attributedata as respective color vectors is executed by performing a transformprocessing operation on each of said sets of color attribute data toderive a corresponding plurality of scalar values which constitute a setof, coordinates of a predetermined color space.
 22. The imagerecognition apparatus according to claim 21, wherein said predeterminedcolor space is an HIS (hue, saturation, intensity) color space.
 23. Theimage recognition apparatus according to claim 22, wherein saidcoordinates of said HSI color space are obtained in the form of polarcoordinates, and wherein said color vector generating means furthercomprises means for converting each said set of polar coordinates to acorresponding plurality of scalar values which are linear coordinates ofan orthogonal color space.
 24. The image recognition apparatus accordingto claim 23, wherein said set of linear coordinates obtainedcorresponding to each of said pixels is derived such that an intensityvalue for said pixel is expressed by a specific one of said set ofcoordinates while hue and saturation values for said pixel are expressedby other ones of said set of coordinates, and wherein said color vectorgenerating means further comprises means for multiplying at least one ofsaid coordinates of said set by an arbitrarily determined parametervalue to thereby alter a relationship between respective magnitudes ofsaid intensity value and said hue and saturation values.
 25. The imagerecognition apparatus according to claim 22, wherein said color vectorgenerating means further comprises means for converting each of saidsets of coordinates of said pixels for said HSI color space to acorresponding set of coordinates of a modified HSI color space, suchthat saturation values expressed in said modified HSI color space arealtered in accordance with corresponding intensity values.
 26. The imagerecognition apparatus according to claim 25, wherein said saturationvalues in the modified HSI color space are decreased in accordance withdecreases in corresponding intensity values, in relation to saturationvalues in said HSI color space.
 27. The image recognition apparatusaccording to claim 25, wherein said saturation values in the modifiedHSI color space are decreased in relation to saturation values in saidHSI color space, in accordance with increases in corresponding intensityvalues from a predetermined median value, and are moreover decreased inrelation to saturation values in said HSI color space, in accordancewith decreases in corresponding intensity values from said predeterminedmedian value.
 28. The image recognition apparatus according to claim 25,wherein said operation of converting each of said sets of coordinates ofsaid pixels for said HSI color space to a corresponding set ofcoordinates of the modified HSI color space is executed by applying apredetermined modification function to each of respective saturationvalues of said HSI color space to obtain modified saturation values. 29.The image recognition apparatus according to claim 28, wherein saidmodification function is derived beforehand based upon a relationshipbetween the intensity values and corresponding saturation values whichare obtained by a transform into an HSI space having a specific size,with each of respective hue, saturation and intensity values expressedas a specific number of data bits.